diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8354aadb33..cdd646657d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -158,6 +158,54 @@ jobs: RUSTFLAGS: "-Dwarnings --cfg=web_sys_unstable_apis" run: mold -run cargo test --all-features + # The plain `cargo test` above only covers the workspace's default members, which leave these out + - name: ๐Ÿงช Run document migration tests + env: + RUSTFLAGS: "-Dwarnings --cfg=web_sys_unstable_apis" + run: >- + mold -run cargo test --all-features + --package migration-core + --package migration-runner + --package migration-formats + --package migration-nodes + --package migration-snapshot + --package document-graph-storage + --package document-format + --package graphene-cli + --package regression + + - name: ๐Ÿ–ผ๏ธ Check that the demo artwork is up to date with its migrations + env: + RUSTFLAGS: "-Dwarnings --cfg=web_sys_unstable_apis" + run: mold -run cargo run --package regression -- upgrade --check + + # Stored types, node version lineages, and node APIs against the base commit. Only needs the snapshot tool, so it runs on a GitHub runner + migrations: + needs: skip-check + if: ${{ !cancelled() && needs.skip-check.outputs.skip != 'true' }} + runs-on: ubuntu-latest + permissions: + contents: read + env: + BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} + steps: + - name: ๐Ÿ“ฅ Clone repository + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + + - name: ๐Ÿฆ€ Install Rust + uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 + with: + toolchain: stable + override: true + cache: false + rustflags: "" + + - name: ๐Ÿ“ฅ Fetch the base commit + run: git fetch --depth=1 origin "$BASE_SHA" + + - name: ๐Ÿ”ฌ Check migrations against the base commit + run: cargo run --locked --package migration-snapshot -- check --baseline "$BASE_SHA" + # Rust format check on GitHub runner rust-fmt: needs: skip-check