Continuous integration #1799
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous integration | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ "16.x", "18.x" ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: "latest" | |
- name: Setup Nodejs ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Run Build | |
run: pnpm run build | |
- name: Clean | |
run: pnpm run clean | |
- name: Run linter | |
run: pnpm run lint | |
- name: Run unit-tests | |
run: pnpm run test | |
- name: Generate coverage report | |
run: pnpm run coverage | |
- name: Upload adapter coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./packages/adapter/coverage/coverage-final.json | |
flags: adapter | |
fail_ci_if_error: true | |
- name: Upload construct coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./packages/construct/coverage/coverage-final.json | |
flags: construct | |
fail_ci_if_error: true |