diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..56af709 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: + - main + - 'feature/*' + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20] # Test against Node.js 20 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - run: yarn install + - run: yarn build + + - name: Run tests with coverage + run: yarn test --coverage + env: + CI: true + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + files: ./coverage/lcov.info + flags: unittests + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }}