Mock imports in app/utils/allDocsPaths.test.ts to run without prebuild step #315
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: 'Test & Lint' | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| sha: | |
| description: 'SHA to rest tests and linting on' | |
| required: true | |
| type: string | |
| pull_request: | |
| paths: | |
| - '**.js' | |
| - '**.jsx' | |
| - '**.ts' | |
| - '**.tsx' | |
| - '**.mjs' | |
| push: | |
| branches: ['main'] | |
| jobs: | |
| test: | |
| name: 'Run Tests 🧪' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
| with: | |
| ref: ${{ github.event.after || inputs.sha }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| cache: 'npm' | |
| node-version-file: 'package.json' | |
| - run: npm i | |
| - run: npm run prebuild # This will be removed once we fix our FS mocks | |
| - run: npm run test | |
| lint: | |
| name: 'Lint' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
| with: | |
| ref: ${{ github.event.after || inputs.sha }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| cache: 'npm' | |
| node-version-file: 'package.json' | |
| - name: Install Dependencies | |
| run: npm i | |
| - name: Run lint check | |
| run: npm run lint |