diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ed51ed8673..f5f64970c2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ env: CARGO_TERM_COLOR: always # renovate: datasource=crate depName=cargo-deny versioning=semver CARGO_DENY_VERSION: 0.18.5 + # renovate: datasource=github-releases depName=cargo-insta lookupName=mitsuhiko/insta versioning=semver + CARGO_INSTA_VERSION: 1.43.2 # renovate: datasource=crate depName=cargo-machete versioning=semver CARGO_MACHETE_VERSION: 0.9.1 # renovate: datasource=github-releases depName=shssoichiro/oxipng versioning=semver @@ -194,12 +196,15 @@ jobs: 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 + - run: sudo systemctl start postgresql.service - run: sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres'" - run: cargo fetch --locked - run: cargo build --tests --workspace - - run: cargo test --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 diff --git a/crates/crates_io_tarball/src/snapshots/crates_io_tarball__tests__lib_with_bins_and_example-2.snap b/crates/crates_io_tarball/src/snapshots/crates_io_tarball__tests__lib_with_bins_and_example-2.snap deleted file mode 100644 index 323d0c50d6c..00000000000 --- a/crates/crates_io_tarball/src/snapshots/crates_io_tarball__tests__lib_with_bins_and_example-2.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: crates/crates_io_tarball/src/lib.rs -expression: tarball_info.manifest.bin ---- -[ - Product { - path: Some( - "src/bin/bar.rs", - ), - name: Some( - "bar", - ), - test: true, - doctest: true, - bench: true, - doc: true, - plugin: false, - proc_macro: false, - harness: true, - edition: None, - required_features: [], - crate_type: None, - }, - Product { - path: Some( - "src/bin/foo.rs", - ), - name: Some( - "foo", - ), - test: true, - doctest: true, - bench: true, - doc: true, - plugin: false, - proc_macro: false, - harness: true, - edition: None, - required_features: [], - crate_type: None, - }, -] diff --git a/crates/crates_io_tarball/src/snapshots/crates_io_tarball__tests__lib_with_bins_and_example-3.snap b/crates/crates_io_tarball/src/snapshots/crates_io_tarball__tests__lib_with_bins_and_example-3.snap deleted file mode 100644 index 0f1fdaaee8f..00000000000 --- a/crates/crates_io_tarball/src/snapshots/crates_io_tarball__tests__lib_with_bins_and_example-3.snap +++ /dev/null @@ -1,28 +0,0 @@ ---- -source: crates/crates_io_tarball/src/lib.rs -expression: tarball_info.manifest.example ---- -[ - Product { - path: Some( - "examples/how-to-use-foo.rs", - ), - name: Some( - "how-to-use-foo", - ), - test: true, - doctest: true, - bench: true, - doc: true, - plugin: false, - proc_macro: false, - harness: true, - edition: None, - required_features: [], - crate_type: Some( - [ - "bin", - ], - ), - }, -]