attempt fix #20
Workflow file for this run
This file contains hidden or 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: Upload Coverage | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Read .nvmrc | |
| run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
| id: nvm | |
| - name: Use Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| always-auth: true | |
| registry-url: https://registry.npmjs.org | |
| node-version: '${{ steps.nvm.outputs.NVMRC }}' | |
| - name: Enable Yarn | |
| run: corepack enable | |
| - name: Get yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: echo "::set-output name=dir::$(yarn cache dir)" | |
| - name: Use cached node_modules | |
| uses: actions/cache@v4 | |
| id: yarn-cache | |
| with: | |
| path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile --non-interactive | |
| - name: 'Test' | |
| run: npx vitest --coverage.enabled true | |
| - name: "Upload Coverage" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vitest-coverage | |
| path: vitest-coverage |