v4 #175
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: CI | |
env: | |
ANALYZE: true | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build, lint and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛒 Checkout Repo | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- name: ⚒️ Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Install Dependencies | |
run: npm run bootstrap | |
- name: Build Library | |
run: pnpm --filter ./lib build | |
- name: Lint | |
run: pnpm lint --reporter=github | |
- name: Run Test | |
run: | | |
pnpm run test | |
cat ${{github.workspace}}/example/tests/coverage-reports/coverage-summary.md >> $GITHUB_STEP_SUMMARY | |
- name: Upload Coverage | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: '${{ secrets.CC_TEST_REPORTER_ID }}' | |
with: | |
debug: true | |
workingDirectory: ${{github.workspace}}/lib | |
coverageLocations: ${{github.workspace}}/example/tests/coverage-reports/*.info:lcov | |
- name: Analyze esbuild bundle size | |
uses: exoego/esbuild-bundle-analyzer@v1 | |
with: | |
metafiles: "lib/dist/metafile-esm.json" |