Remove obsolete nginx wrapper #14693
Workflow file for this run
This file contains 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: | |
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.14.3 | |
# renovate: datasource=crate depName=diesel_cli versioning=semver | |
DIESEL_CLI_VERSION: 2.1.1 | |
# renovate: datasource=npm depName=pnpm | |
PNPM_VERSION: 8.10.0 | |
jobs: | |
changed-files: | |
name: Changed Files | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: tj-actions/changed-files@af292f1e845a0377b596972698a8598734eb2796 # v40.0.0 | |
id: changed-files-non-js | |
with: | |
files_ignore: | | |
app/** | |
mirage/** | |
public/** | |
tests/** | |
.eslintrc | |
.template-lintrc.js | |
ember-cli-build.js | |
package.json | |
pnpm-lock.yaml | |
testem.js | |
- uses: tj-actions/changed-files@af292f1e845a0377b596972698a8598734eb2796 # v40.0.0 | |
id: changed-files-non-rust | |
with: | |
files_ignore: | | |
crates_io_*/** | |
migrations/** | |
src/** | |
build.rs | |
Cargo.lock | |
Cargo.toml | |
rust-toolchain.toml | |
- uses: tj-actions/changed-files@af292f1e845a0377b596972698a8598734eb2796 # v40.0.0 | |
id: changed-files-rust-lockfile | |
with: | |
files: Cargo.lock | |
outputs: | |
non-js: ${{ steps.changed-files-non-js.outputs.any_modified }} | |
non-rust: ${{ steps.changed-files-non-rust.outputs.any_modified }} | |
rust-lockfile: ${{ steps.changed-files-rust-lockfile.outputs.any_modified }} | |
backend-lint: | |
name: Backend / Lint | |
runs-on: ubuntu-22.04 | |
needs: changed-files | |
if: needs.changed-files.outputs.non-js == 'true' | |
env: | |
RUSTFLAGS: "-D warnings" | |
RUSTDOCFLAGS: "-D warnings" | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- run: rustup component add rustfmt | |
- run: rustup component add clippy | |
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1 | |
- run: cargo fmt --check --all | |
- run: cargo clippy --all-targets --all-features --workspace | |
- run: cargo doc --no-deps --document-private-items | |
backend-cargo-deny: | |
name: Backend / cargo-deny | |
runs-on: ubuntu-22.04 | |
needs: changed-files | |
if: github.event_name != 'pull_request' || needs.changed-files.outputs.rust-lockfile == 'true' | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1 | |
- run: cargo install cargo-deny --vers ${{ env.CARGO_DENY_VERSION }} | |
- run: cargo deny check | |
backend-test: | |
name: Backend / Test | |
runs-on: ubuntu-22.04 | |
needs: changed-files | |
if: needs.changed-files.outputs.non-js == 'true' | |
env: | |
RUST_BACKTRACE: 1 | |
DATABASE_URL: postgres://postgres:postgres@localhost/cargo_registry_test | |
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" | |
services: | |
postgres: | |
image: postgres:13@sha256:eee22204934b36935237e7c92355e3178cfdf3c5377dec9c19c848115cc4637b | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1 | |
- run: cargo install diesel_cli --vers ${{ env.DIESEL_CLI_VERSION }} --no-default-features --features postgres --debug | |
- run: diesel database setup --locked-schema | |
- run: cargo build --tests --workspace | |
- run: cargo test --workspace | |
frontend-lint: | |
name: Frontend / Lint | |
runs-on: ubuntu-22.04 | |
needs: changed-files | |
if: needs.changed-files.outputs.non-rust == 'true' | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | |
with: | |
cache: pnpm | |
node-version-file: package.json | |
- run: pnpm install | |
- run: pnpm lint:hbs | |
- run: pnpm lint:js | |
- run: pnpm lint:deps | |
frontend-test: | |
name: Frontend / Test | |
runs-on: ubuntu-22.04 | |
needs: changed-files | |
if: needs.changed-files.outputs.non-rust == '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: 0d8707a02b19aebbec79bb0bf302b8d2fa95edb33169cfe41b084289596670b1 | |
PERCY_PROJECT: crates-io/crates.io | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | |
with: | |
cache: pnpm | |
node-version-file: package.json | |
- run: pnpm install | |
- if: github.repository == 'rust-lang/crates.io' | |
run: pnpm percy exec -- pnpm test-coverage | |
- if: github.repository != 'rust-lang/crates.io' | |
run: pnpm test-coverage |