Skip to content

Commit ebf880a

Browse files
committed
Add snapshot tests in CI
1 parent 2cec825 commit ebf880a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/snapshot_tests.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Snapshot tests
2+
on:
3+
pull_request
4+
5+
env:
6+
# renovate: datasource=github-tags depName=rust lookupName=rust-lang/rust
7+
RUST_VERSION: 1.85.1
8+
9+
jobs:
10+
snapshot-tests:
11+
runs-on: ubuntu-latest
12+
if: contains(github.event.pull_request.body, 'RUN_SNAPSHOT_TESTS')
13+
steps:
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15+
- run: rustup override set ${{ env.RUST_VERSION }}
16+
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
17+
18+
- run: git fetch --depth 2
19+
- run: git checkout origin/master
20+
- name: Generate good snapshots
21+
run: INSTA_OUTPUT=none INSTA_UPDATE=always cargo test -- --include-ignored
22+
- run: git checkout $GITHUB_SHA # merge of master+branch
23+
- run: cargo test -- --include-ignored

0 commit comments

Comments
 (0)