From 80e2de49b0d9d78336803dc2b78ebf5ce956c7ce Mon Sep 17 00:00:00 2001 From: Daniel Parks Date: Sun, 18 Feb 2024 22:05:38 -0800 Subject: [PATCH 1/3] PR Checks: fix workflow to run after merging a PR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the job would only run when opening or updating a PR. This was unintentional, and a result of a misunderstanding of the `$default-branch` “macro”, which is only used in workflow _templates_. In actual workflows, it does nothing. This just changes to explicitly using the branch name `main`. It’s important that the job run after merge in order to update the cache. The cache that’s saved when the PR is opened or updated is [isolated to just that PR][isolation], whereas the cache on `main` can be accessed by future PRs. [isolation]: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache --- .github/workflows/pr-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 5fa5d09..a4e24cc 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - $default-branch + - main pull_request: jobs: From afbe2af2d071b7c22718b53ba49b380a1ca3a958 Mon Sep 17 00:00:00 2001 From: Daniel Parks Date: Sun, 18 Feb 2024 22:06:16 -0800 Subject: [PATCH 2/3] PR Checks: `cargo build --tests --all-features`. --- .github/workflows/pr-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index a4e24cc..98695c4 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo build --tests + - run: cargo build --tests --all-features - run: cargo test --all-features - run: cargo test --features unescape - run: cargo test --features entities From 73794e9d5a0185a19ae3b38f2aee9fdcc1a9454c Mon Sep 17 00:00:00 2001 From: Daniel Parks Date: Sun, 18 Feb 2024 22:06:45 -0800 Subject: [PATCH 3/3] PR Checks: add caching for `cargo msrv verify`. --- .github/workflows/pr-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 98695c4..ee631e6 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -64,7 +64,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@v2 with: tool: cargo-msrv