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