fix: added test deps to osv scanner #90
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: 'CI' | |
| on: | |
| pull_request: | |
| paths-ignore: ['**.md'] | |
| push: | |
| paths-ignore: ['**.md'] | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| actions: read | |
| checks: write | |
| jobs: | |
| build-test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm run format-check | |
| - run: npm run lint | |
| - run: npm test | |
| - name: Upload test results | |
| if: success() || failure() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: test-results | |
| path: __tests__/__results__/*.xml | |
| - name: Create test report | |
| uses: ./ | |
| with: | |
| artifact: test-results | |
| name: Workflow Report | |
| path: '*.xml' | |
| reporter: jest-junit | |
| - name: Create mochawesome report | |
| uses: ./ | |
| if: success() || failure() | |
| with: | |
| name: Mochawesome Tests | |
| path: __tests__/fixtures/mochawesome-json.json | |
| reporter: mochawesome-json | |
| fail-on-error: false | |