Classification plein-écran #4609
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: Checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| env: | |
| ELECTRON_SKIP_BINARY_DOWNLOAD: 'true' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version-file: .bun-version | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Lint | |
| run: bun run lint | |
| json-schema: | |
| name: Validate JSONs | |
| uses: ./.github/workflows/schemas.yml | |
| clutter: | |
| name: Check for clutter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version-file: .bun-version | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Check for clutter | |
| run: bun knip --reporter github-actions | |
| build: | |
| name: Build | |
| uses: ./.github/workflows/build.yml | |
| with: | |
| minify: false | |
| test: | |
| needs: build | |
| name: Unit tests | |
| uses: ./.github/workflows/vitest.yml | |
| with: | |
| publish-report: false | |
| compare-coverage: false | |
| coverage: | |
| if: github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/') | |
| needs: test | |
| name: Check coverage | |
| uses: ./.github/workflows/vitest.yml | |
| with: | |
| compare-coverage: true | |
| e2e: | |
| needs: [build, json-schema, lint, test] | |
| name: E2E | |
| uses: ./.github/workflows/playwright.yml | |
| with: | |
| artifact: ${{ needs.build.outputs.artifact }} | |
| bundlesize: | |
| if: github.ref_name != 'main' | |
| needs: test | |
| name: Bundle size | |
| uses: ./.github/workflows/bundlesize.yml | |
| preview: | |
| if: github.event_name == 'pull_request' | |
| needs: [json-schema, build] | |
| name: PR Preview | |
| uses: ./.github/workflows/preview.yml | |
| deploy: | |
| if: github.event_name == 'push' && github.ref_name == 'main' | |
| needs: e2e | |
| name: Deploy | |
| concurrency: | |
| group: deploy-gh-pages | |
| cancel-in-progress: true | |
| uses: ./.github/workflows/deploy.yml | |
| electron: | |
| if: github.event_name == 'pull_request' | |
| needs: [e2e] | |
| name: Electron | |
| uses: ./.github/workflows/electron.yml | |
| dont-merge-comment: | |
| name: Check for presence of "do not merge" comment | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: | | |
| # Check for "do not merge" comment in the codebase | |
| if git grep -q "$prefix: $message"; then | |
| echo "Found "$prefix: $message" in source code. Failing the job." | |
| exit 1 | |
| else | |
| echo "No "$prefix: $message" found in source code." | |
| fi | |
| env: | |
| prefix: XXX | |
| message: DONT MERGE | |
| is-mergeable: | |
| if: github.event_name == 'pull_request' && !cancelled() | |
| name: Mergeable? | |
| needs: | |
| - build | |
| - json-schema | |
| - lint | |
| - test | |
| - coverage | |
| - e2e | |
| - clutter | |
| - preview | |
| - electron | |
| - bundlesize | |
| - dont-merge-comment | |
| runs-on: ubuntu-latest | |
| steps: | |
| - if: contains(needs.*.result, 'failure') | |
| run: echo "Some tests failed :'("; exit 1 | |
| - if: ${{ !contains(needs.*.result, 'failure') }} | |
| run: echo "All checks passed! This PR is mergeable :D" |