From 4efc2c5a54ff2d809f07384e1c5b52b9876ea441 Mon Sep 17 00:00:00 2001 From: Tim Schwarz <4171783+tmjssz@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:21:43 +0200 Subject: [PATCH] Add Github workflow for unit tests --- .github/workflows/unit-test.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/unit-test.yml diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 0000000..91b6cb5 --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,35 @@ +name: Unit Tests +on: + pull_request: + push: + branches: + - main + - development +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: yarn + + - name: Yarn install + run: yarn install --frozen-lockfile + + - name: Build + run: yarn build + + - name: Test + run: yarn coverage + + - name: Upload coverage report + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + files: coverage/lcov.info