From 13a4ff7f3eeb70d9f2d19958c826441e3ba81566 Mon Sep 17 00:00:00 2001 From: Kaya-Sem Date: Sun, 14 Jul 2024 11:08:59 +0200 Subject: [PATCH] test --- .github/workflows/test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b54c4c2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test +on: [push, pull_request, workflow_dispatch] +jobs: + test: + runs-on: ubuntu-latest + steps: + # Your original steps + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - name: Install + run: npm install + - name: Test and Coverage + run: npm run test:cov # or npm run coverage + + # Add this + - name: Update Coverage Badge + # GitHub actions: default branch variable + # https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable + if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + uses: we-cli/coverage-badge-action@main