From 6b31f5b4542749651a1e1c96f0f074a77597fff7 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 3 Mar 2022 00:23:05 +1000 Subject: [PATCH] fix(ci): update CI job path triggers (#3692) * ci(test): re-run tests when snapshot data changes * fix(ci): rebuild state when disk format changes * fix(ci): rebuild rust docs when code or dependencies change * doc(ci): explain why we run jobs when files change Co-authored-by: Gustavo Valverde --- .github/workflows/ci.patch.yml | 1 + .github/workflows/ci.yml | 7 +++++++ .github/workflows/coverage.patch.yml | 1 + .github/workflows/coverage.yml | 7 +++++++ .github/workflows/docs.yml | 6 ++++++ .github/workflows/lint.yml | 3 +++ .github/workflows/test.patch.yml | 1 + .github/workflows/test.yml | 11 +++++++++++ .github/workflows/zcash-params.yml | 2 ++ 9 files changed, 39 insertions(+) diff --git a/.github/workflows/ci.patch.yml b/.github/workflows/ci.patch.yml index d5525509..487ecad6 100644 --- a/.github/workflows/ci.patch.yml +++ b/.github/workflows/ci.patch.yml @@ -5,6 +5,7 @@ on: paths-ignore: - '**/*.rs' - '**/*.txt' + - '**/*.snap' - '**/Cargo.toml' - '**/Cargo.lock' - '**/deny.toml' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 755c6fea..1f85adc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,18 @@ on: workflow_dispatch: pull_request: paths: + # code and tests - '**/*.rs' + # hard-coded checkpoints - '**/*.txt' + # test data snapshots + - '**/*.snap' + # dependencies - '**/Cargo.toml' - '**/Cargo.lock' - '**/deny.toml' + # workflow definitions + - 'docker/**' - '.github/workflows/ci.yml' env: diff --git a/.github/workflows/coverage.patch.yml b/.github/workflows/coverage.patch.yml index 586736bc..325fb164 100644 --- a/.github/workflows/coverage.patch.yml +++ b/.github/workflows/coverage.patch.yml @@ -5,6 +5,7 @@ on: paths-ignore: - '**/*.rs' - '**/*.txt' + - '**/*.snap' - '**/Cargo.toml' - '**/Cargo.lock' - 'codecov.yml' diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 695cd5e3..5b59d7a0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -6,16 +6,23 @@ on: branches: - main paths: + # code and tests - '**/*.rs' + # hard-coded checkpoints - '**/*.txt' + # test data snapshots + - '**/*.snap' + # dependencies - '**/Cargo.toml' - '**/Cargo.lock' + # workflow definitions - 'codecov.yml' - '.github/workflows/coverage.yml' pull_request: paths: - '**/*.rs' - '**/*.txt' + - '**/*.snap' - '**/Cargo.toml' - '**/Cargo.lock' - 'codecov.yml' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b589ae1f..488592ae 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,9 +6,15 @@ on: branches: - main paths: + # doc source files - 'book/**' - '**/firebase.json' - 'katex-header.html' + # rustdoc source files + - '**/*.rs' + - '**/Cargo.toml' + - '**/Cargo.lock' + # workflow definitions - '.github/workflows/docs.yml' jobs: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c7102bb8..9cae2d9f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,9 +6,12 @@ on: - "**" - "!main" paths: + # code and tests - '**/*.rs' + # dependencies - '**/Cargo.toml' - '**/Cargo.lock' + # workflow definitions - 'clippy.toml' - '.cargo/config.toml' - '.github/workflows/lint.yml' diff --git a/.github/workflows/test.patch.yml b/.github/workflows/test.patch.yml index c1110a67..0b0b89dd 100644 --- a/.github/workflows/test.patch.yml +++ b/.github/workflows/test.patch.yml @@ -7,6 +7,7 @@ on: paths-ignore: - '**/*.rs' - '**/*.txt' + - '**/*.snap' - '**/Cargo.toml' - '**/Cargo.lock' - 'docker/**' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df0b0180..364bb98b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,10 +13,16 @@ on: branches: - main paths: + # code and tests - '**/*.rs' + # hard-coded checkpoints - '**/*.txt' + # test data snapshots + - '**/*.snap' + # dependencies - '**/Cargo.toml' - '**/Cargo.lock' + # workflow definitions - 'docker/**' - '.github/workflows/test.yml' pull_request_review: @@ -195,11 +201,16 @@ jobs: uses: tj-actions/changed-files@v17.2 with: files: | + /zebra-state/**/config.rs /zebra-state/**/constants.rs /zebra-state/**/finalized_state.rs /zebra-state/**/disk_format.rs /zebra-state/**/disk_db.rs /zebra-state/**/zebra_db.rs + /zebra-state/**/zebra_db/block.rs + /zebra-state/**/zebra_db/chain.rs + /zebra-state/**/zebra_db/shielded.rs + /zebra-state/**/zebra_db/transparent.rs - name: Inject slug/short variables uses: rlespinasse/github-slug-action@v4 diff --git a/.github/workflows/zcash-params.yml b/.github/workflows/zcash-params.yml index 129cb64a..b7704629 100644 --- a/.github/workflows/zcash-params.yml +++ b/.github/workflows/zcash-params.yml @@ -6,9 +6,11 @@ on: branches: - 'main' paths: + # parameter download code - 'zebra-consensus/src/primitives/groth16/params.rs' - 'zebra-consensus/src/chain.rs' - 'zebrad/src/commands/start.rs' + # workflow definitions - 'docker/zcash-params/Dockerfile' - '.github/workflows/zcash-params.yml'