Render Markdown definition lists #31224
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| permissions: {} | |
| concurrency: | |
| group: ci-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # renovate: datasource=crate depName=cargo-deny versioning=semver | |
| CARGO_DENY_VERSION: 0.19.8 | |
| # renovate: datasource=github-releases depName=cargo-insta lookupName=mitsuhiko/insta versioning=semver | |
| CARGO_INSTA_VERSION: 1.48.0 | |
| # renovate: datasource=crate depName=cargo-machete versioning=semver | |
| CARGO_MACHETE_VERSION: 0.9.2 | |
| # renovate: datasource=crate depName=diesel-guard versioning=semver | |
| DIESEL_GUARD_VERSION: 0.11.0 | |
| # renovate: datasource=pypi depName=zizmor | |
| ZIZMOR_VERSION: 1.25.2 | |
| jobs: | |
| filter-jobs: | |
| name: Filter Jobs | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| # This is needed to get the commit history for the changed-files action | |
| # (see https://github.com/tj-actions/changed-files/blob/v46.0.5/README.md#usage-) | |
| fetch-depth: 0 | |
| - uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 | |
| id: changed-files | |
| with: | |
| files_yaml_from_source_file: .github/changed-files.yml | |
| outputs: | |
| backend-lint: ${{ steps.changed-files.outputs.backend_lint_any_modified }} | |
| backend-deps: ${{ steps.changed-files.outputs.backend_deps_any_modified || github.event_name == 'push' }} | |
| backend-migrations: ${{ steps.changed-files.outputs.backend_migrations_any_modified }} | |
| backend-test: ${{ steps.changed-files.outputs.backend_test_any_modified }} | |
| frontend-lint: ${{ steps.changed-files.outputs.frontend_lint_any_modified }} | |
| msw-test: ${{ steps.changed-files.outputs.msw_test_any_modified }} | |
| api-client-test: ${{ steps.changed-files.outputs.api_client_test_any_modified }} | |
| e2e-test: ${{ steps.changed-files.outputs.e2e_test_any_modified }} | |
| svelte: ${{ steps.changed-files.outputs.svelte_any_modified }} | |
| zizmor: ${{ steps.changed-files.outputs.zizmor_any_modified }} | |
| backend-lint: | |
| name: Backend / Lint | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.backend-lint == 'true' | |
| env: | |
| RUSTFLAGS: '-D warnings' | |
| RUSTDOCFLAGS: '-D warnings' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - run: rustup component add rustfmt | |
| - run: rustup component add clippy | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - run: cargo fmt --check --all | |
| - run: cargo clippy --all-targets --all-features --workspace | |
| - run: cargo doc --no-deps --document-private-items | |
| backend-deps: | |
| name: Backend / dependencies | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.backend-deps == 'true' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - run: cargo install cargo-deny --vers ${CARGO_DENY_VERSION} | |
| - run: cargo deny check | |
| - run: cargo install cargo-machete --vers ${CARGO_MACHETE_VERSION} | |
| - run: cargo machete | |
| backend-migrations: | |
| name: Backend / migrations | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.backend-migrations == 'true' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - run: cargo install diesel-guard --vers ${DIESEL_GUARD_VERSION} | |
| - run: diesel-guard check migrations/ | |
| backend-test: | |
| name: Backend / Test | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.backend-test == 'true' | |
| env: | |
| CARGO_PROFILE_DEV_DEBUG: line-tables-only | |
| RUST_BACKTRACE: 1 | |
| TEST_DATABASE_URL: postgres://postgres:postgres@localhost/cargo_registry_test | |
| RUSTFLAGS: '-D warnings' | |
| MALLOC_CONF: 'background_thread:true,abort_conf:true,abort:true,junk:true' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| # Remove the Android SDK in the background to free up space | |
| - run: sudo rm -rf /usr/local/lib/android & | |
| - name: Download Fira Sans font | |
| run: | | |
| wget -q "https://github.com/mozilla/Fira/archive/4.202.zip" | |
| unzip -q "4.202.zip" | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install cargo-insta | |
| run: curl -LsSf https://github.com/mitsuhiko/insta/releases/download/${CARGO_INSTA_VERSION}/cargo-insta-installer.sh | sh | |
| # `shell: bash` enables `pipefail` so a failing `curl` fails the step | |
| # instead of being masked by `sh` exiting successfully. | |
| # See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference | |
| shell: bash | |
| - run: sudo systemctl start postgresql.service | |
| - run: sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres'" | |
| - run: sudo -u postgres createdb --lc-collate=C --lc-ctype=C -T template0 cargo_registry_test | |
| - run: cargo fetch --locked | |
| - run: cargo build --tests --workspace | |
| - run: cargo insta test --require-full-match --unreferenced=reject --workspace | |
| env: | |
| # Set the path to the Fira Sans font for Typst. | |
| TYPST_FONT_PATH: ${{ github.workspace }}/Fira-4.202/otf | |
| frontend-lint: | |
| name: Frontend / Lint | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.frontend-lint == 'true' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 11.6.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version-file: package.json | |
| - run: pnpm install | |
| - run: pnpm lint:js | |
| - run: pnpm prettier:check | |
| msw-test: | |
| name: Frontend / Test (@crates-io/msw) | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.msw-test == 'true' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 11.6.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version-file: package.json | |
| - run: pnpm install | |
| - run: pnpm --filter "@crates-io/msw" test | |
| api-client-test: | |
| name: Frontend / Test (@crates-io/api-client) | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.api-client-test == 'true' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 11.6.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version-file: package.json | |
| - run: pnpm install | |
| - run: pnpm --filter "@crates-io/api-client" test | |
| e2e-test: | |
| name: Frontend / Test (playwright) | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| timeout-minutes: 60 | |
| if: needs.filter-jobs.outputs.e2e-test == 'true' | |
| env: | |
| JOBS: 1 # See https://git.io/vdao3 for details. | |
| # Percy secrets are included here to enable Percy's GitHub integration | |
| # on community-submitted PRs | |
| PERCY_TOKEN: web_0a783d8086b6f996809f3e751d032dd6d156782082bcd1423b9b860113c75054 | |
| PERCY_CLIENT_ERROR_LOGS: 'false' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 11.6.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version-file: package.json | |
| - run: pnpm install | |
| - run: pnpm playwright install chromium | |
| # Reuse the Chromium that Playwright just installed instead of letting | |
| # @percy/core download its own. | |
| - run: echo "PERCY_BROWSER_EXECUTABLE=$(node -e "console.log(require('@playwright/test').chromium.executablePath())")" >> "$GITHUB_ENV" | |
| - if: github.repository == 'rust-lang/crates.io' | |
| run: pnpm percy exec -- pnpm e2e:svelte | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 14 | |
| zizmor: | |
| name: CI / Lint | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.zizmor == 'true' | |
| permissions: | |
| security-events: write # needed by `codeql-action/upload-sarif` to upload zizmor results to GitHub code scanning | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| - run: uvx zizmor@${ZIZMOR_VERSION} --format=sarif . > results.sarif | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 | |
| with: | |
| sarif_file: results.sarif | |
| category: zizmor | |
| svelte: | |
| name: Frontend / Test | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.svelte == 'true' | |
| defaults: | |
| run: | |
| working-directory: svelte | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 11.6.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version-file: package.json | |
| - run: pnpm install | |
| - run: pnpm check | |
| - run: pnpm build | |
| - run: pnpm playwright install chromium-headless-shell | |
| - run: pnpm test | |
| svelte-chromatic: | |
| name: Svelte / Chromatic | |
| runs-on: ubuntu-24.04 | |
| needs: filter-jobs | |
| if: needs.filter-jobs.outputs.svelte == 'true' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 11.6.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| cache: pnpm | |
| node-version-file: package.json | |
| - run: pnpm install | |
| # Chromatic token is included here to enable visual regression testing | |
| # on community-submitted PRs | |
| - uses: chromaui/action@1db61b73b7919508ee8e62336f04bd0aed6da756 # v17.4.1 | |
| with: | |
| workingDir: svelte | |
| projectToken: chpt_015c1709eb9b9fa | |
| autoAcceptChanges: main | |
| exitZeroOnChanges: false |