Skip to content

Commit

Permalink
setup codecov coverage and bundle size reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Veneman committed Jun 3, 2024
1 parent 1efe8b4 commit 4668db7
Show file tree
Hide file tree
Showing 4 changed files with 2,466 additions and 88 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm install --ignore-scripts --no-audit
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm install --ignore-scripts --no-audit
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Lint JS
run: npx --yes oxlint@latest -D perf

Expand All @@ -32,9 +32,9 @@ jobs:
- 20

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand All @@ -46,14 +46,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install --ignore-scripts --no-audit --no-fund
- name: Build package
run: npm run build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Lint package
run: npx --yes publint
- run: npm test
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Loading

0 comments on commit 4668db7

Please sign in to comment.