Merge pull request #1025 from ahmadk953/dependabot/npm_and_yarn/radix… #306
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: Run tests and upload coverage | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: Run tests and collect coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'latest' | |
- name: Configure Corepack | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build content collections | |
run: yarn build-collections | |
- name: Run tests | |
run: yarn coverage | |
- name: Generate junit.xml | |
run: yarn generate-junit | |
- name: Upload results to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload junit.xml to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |