style(ci): lint and standardize the actions structure (#3940)
* style(ci): comply with https://json.schemastore.org/github-workflow.json Some substituions were harder to make as files were not standardized * fix(mergify): use correct name for macos * style(actions): revert to single quotes * style: lint dependabot and mergify conf files * style: remove conditions with missing context * imp(lint): automate GH Actions linting * fix(lint): some actions need to be triggered by PR event * fix(lint): consider all workflow YAMLs * Use the same paths in the patch file * revert: keep condition as is * add TODO * fix: add missing checkpoint_sync input Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
d09769714f
commit
831a2009bd
|
@ -1,22 +1,22 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: cargo
|
||||
directory: "/"
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: daily
|
||||
timezone: America/New_York
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "A-dependencies"
|
||||
- "A-rust"
|
||||
- "P-Low :snowflake:"
|
||||
- 'A-dependencies'
|
||||
- 'A-rust'
|
||||
- 'P-Low :snowflake:'
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: daily
|
||||
timezone: America/New_York
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "A-infrastructure"
|
||||
- "A-dependencies"
|
||||
- "P-Low :snowflake:"
|
||||
- 'A-infrastructure'
|
||||
- 'A-dependencies'
|
||||
- 'P-Low :snowflake:'
|
||||
|
|
|
@ -10,7 +10,7 @@ queue_rules:
|
|||
- check-success=Test full validation sync from cached state
|
||||
- check-success=Test stable zebra-state with fake activation heights on ubuntu-latest
|
||||
- check-success=Test stable on ubuntu-latest
|
||||
- check-success=Test stable on macOS-latest
|
||||
- check-success=Test stable on macos-latest
|
||||
# TODO: Windows was removed for now, see https://github.com/ZcashFoundation/zebra/issues/3801
|
||||
# - check-success=Test stable on windows-latest
|
||||
- check-success=Clippy
|
||||
|
@ -27,7 +27,7 @@ queue_rules:
|
|||
- check-success=Test full validation sync from cached state
|
||||
- check-success=Test stable zebra-state with fake activation heights on ubuntu-latest
|
||||
- check-success=Test stable on ubuntu-latest
|
||||
- check-success=Test stable on macOS-latest
|
||||
- check-success=Test stable on macos-latest
|
||||
# - check-success=Test stable on windows-latest
|
||||
- check-success=Clippy
|
||||
- check-success=Rustfmt
|
||||
|
@ -43,7 +43,7 @@ queue_rules:
|
|||
- check-success=Test full validation sync from cached state
|
||||
- check-success=Test stable zebra-state with fake activation heights on ubuntu-latest
|
||||
- check-success=Test stable on ubuntu-latest
|
||||
- check-success=Test stable on macOS-latest
|
||||
- check-success=Test stable on macos-latest
|
||||
# - check-success=Test stable on windows-latest
|
||||
- check-success=Clippy
|
||||
- check-success=Rustfmt
|
||||
|
@ -51,13 +51,13 @@ queue_rules:
|
|||
pull_request_rules:
|
||||
- name: move to urgent queue when CI passes with 1 review and not WIP targeting main
|
||||
conditions:
|
||||
- "#approved-reviews-by>=1"
|
||||
- "#review-threads-unresolved=0"
|
||||
- '#approved-reviews-by>=1'
|
||||
- '#review-threads-unresolved=0'
|
||||
- -draft
|
||||
- base=main
|
||||
- or:
|
||||
- "label~=^P-Critical"
|
||||
- "label~=^P-High"
|
||||
- 'label~=^P-Critical'
|
||||
- 'label~=^P-High'
|
||||
- label!=do-not-merge
|
||||
actions:
|
||||
queue:
|
||||
|
@ -66,11 +66,11 @@ pull_request_rules:
|
|||
|
||||
- name: move to medium queue when CI passes with 1 review and not WIP targeting main
|
||||
conditions:
|
||||
- "#approved-reviews-by>=1"
|
||||
- "#review-threads-unresolved=0"
|
||||
- '#approved-reviews-by>=1'
|
||||
- '#review-threads-unresolved=0'
|
||||
- -draft
|
||||
- base=main
|
||||
- "label~=^P-Medium"
|
||||
- 'label~=^P-Medium'
|
||||
- label!=do-not-merge
|
||||
actions:
|
||||
queue:
|
||||
|
@ -79,8 +79,8 @@ pull_request_rules:
|
|||
|
||||
- name: move to low queue when CI passes with 1 review and not WIP targeting main
|
||||
conditions:
|
||||
- "#approved-reviews-by>=1"
|
||||
- "#review-threads-unresolved=0"
|
||||
- '#approved-reviews-by>=1'
|
||||
- '#review-threads-unresolved=0'
|
||||
- -draft
|
||||
- base=main
|
||||
- label!=do-not-merge
|
||||
|
|
|
@ -5,8 +5,12 @@ on:
|
|||
inputs:
|
||||
network:
|
||||
default: 'Mainnet'
|
||||
description: 'Network to deploy: Mainnet or Testnet'
|
||||
required: true
|
||||
checkpoint_sync:
|
||||
default: true
|
||||
default: 'true'
|
||||
description: 'Use as many checkpoints as possible when syncing'
|
||||
required: true
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
# TODO: Windows was removed for now, see https://github.com/ZcashFoundation/zebra/issues/3801
|
||||
os: [ubuntu-latest, macOS-latest]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
rust: [stable]
|
||||
|
||||
steps:
|
||||
|
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
# TODO: Windows was removed for now, see https://github.com/ZcashFoundation/zebra/issues/3801
|
||||
os: [ubuntu-latest, macOS-latest]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
rust: [stable]
|
||||
|
||||
steps:
|
||||
|
@ -67,7 +67,7 @@ jobs:
|
|||
# Ubuntu runners don't have reliable network or DNS during test steps.
|
||||
# Windows runners have an unreliable network.
|
||||
shell: bash
|
||||
if: matrix.os != 'macOS-latest'
|
||||
if: matrix.os != 'macos-latest'
|
||||
run: echo "ZEBRA_SKIP_NETWORK_TESTS=1" >> $GITHUB_ENV
|
||||
|
||||
- name: Minimise proptest cases on macOS and Windows
|
||||
|
@ -118,7 +118,7 @@ jobs:
|
|||
|
||||
- name: Run zebrad large sync tests
|
||||
# Skip the entire step on Ubuntu and Windows, because the test would be skipped anyway due to ZEBRA_SKIP_NETWORK_TESTS
|
||||
if: matrix.os == 'macOS-latest'
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: test
|
||||
|
@ -159,7 +159,7 @@ jobs:
|
|||
- name: Run tests with fake activation heights
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
env:
|
||||
TEST_FAKE_ACTIVATION_HEIGHTS: ""
|
||||
TEST_FAKE_ACTIVATION_HEIGHTS: ''
|
||||
with:
|
||||
command: test
|
||||
# Note: this only runs the zebra-state crate tests,
|
||||
|
|
|
@ -59,7 +59,7 @@ jobs:
|
|||
# Exclude zebra-utils, it is not for library or app users
|
||||
cargo doc --no-deps --workspace --exclude zebra-utils
|
||||
env:
|
||||
RUSTDOCFLAGS: "--html-in-header katex-header.html"
|
||||
RUSTDOCFLAGS: '--html-in-header katex-header.html'
|
||||
|
||||
- name: Deploy external docs to firebase
|
||||
uses: w9jds/firebase-action@v2.0.0
|
||||
|
@ -73,7 +73,7 @@ jobs:
|
|||
run: |
|
||||
cargo doc --no-deps --document-private-items
|
||||
env:
|
||||
RUSTDOCFLAGS: "--html-in-header katex-header.html"
|
||||
RUSTDOCFLAGS: '--html-in-header katex-header.html'
|
||||
|
||||
- name: Deploy internal docs to firebase
|
||||
uses: w9jds/firebase-action@v2.0.0
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
name: Lint Rust files
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
- "!main"
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- '**/*.rs'
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
- 'clippy.toml'
|
||||
- '.cargo/config.toml'
|
||||
- '.github/workflows/lint.yml'
|
||||
- '.github/workflows/*.yml'
|
||||
|
||||
jobs:
|
||||
clippy:
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
name: Lint Rust files
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
- "!main"
|
||||
- 'main'
|
||||
paths:
|
||||
# code and tests
|
||||
- '**/*.rs'
|
||||
|
@ -14,7 +13,8 @@ on:
|
|||
# workflow definitions
|
||||
- 'clippy.toml'
|
||||
- '.cargo/config.toml'
|
||||
- '.github/workflows/lint.yml'
|
||||
# TODO: we might want to run this in a separate workflow in the future for the `actionlint` job
|
||||
- '.github/workflows/*.yml'
|
||||
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
@ -82,3 +82,9 @@ jobs:
|
|||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
actionlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: reviewdog/action-actionlint@v1.21.0
|
||||
|
|
|
@ -5,6 +5,12 @@ on:
|
|||
inputs:
|
||||
network:
|
||||
default: 'Mainnet'
|
||||
description: 'Network to deploy: Mainnet or Testnet'
|
||||
required: true
|
||||
checkpoint_sync:
|
||||
default: 'true'
|
||||
description: 'Configures `zebrad` to use as many checkpoints as possible'
|
||||
required: true
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
@ -24,7 +30,7 @@ on:
|
|||
|
||||
env:
|
||||
CARGO_INCREMENTAL: '1'
|
||||
ZEBRA_SKIP_IPV6_TESTS: "1"
|
||||
ZEBRA_SKIP_IPV6_TESTS: '1'
|
||||
RUST_BACKTRACE: full
|
||||
RUST_LIB_BACKTRACE: full
|
||||
COLORBT_SHOW_HIDDEN: '1'
|
||||
|
|
|
@ -25,7 +25,6 @@ jobs:
|
|||
name: Test all
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' }}
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
|
@ -33,7 +32,6 @@ jobs:
|
|||
name: Test with fake activation heights
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' }}
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
|
@ -42,7 +40,6 @@ jobs:
|
|||
name: Test checkpoint sync from empty state
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ github.event.inputs.regenerate-disks != 'true' }}
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
|
@ -57,8 +54,6 @@ jobs:
|
|||
name: Regenerate stateful disks
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
outputs:
|
||||
disk_short_sha: ${{ steps.disk-short-sha.outputs.disk_short_sha }}
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
|
|
|
@ -5,10 +5,17 @@ on:
|
|||
inputs:
|
||||
network:
|
||||
default: 'Mainnet'
|
||||
description: 'Network to deploy: Mainnet or Testnet'
|
||||
required: true
|
||||
checkpoint_sync:
|
||||
default: 'true'
|
||||
description: 'Configures `zebrad` to use as many checkpoints as possible'
|
||||
required: true
|
||||
regenerate-disks:
|
||||
type: boolean
|
||||
default: false
|
||||
description: Just update stateful disks
|
||||
description: 'Just update stateful disks'
|
||||
required: true
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
|
|
@ -4,9 +4,13 @@ on:
|
|||
workflow_dispatch:
|
||||
inputs:
|
||||
network:
|
||||
default: 'Testnet'
|
||||
default: 'Mainnet'
|
||||
description: 'Network to deploy: Mainnet or Testnet'
|
||||
required: true
|
||||
size:
|
||||
default: 10
|
||||
default: '10'
|
||||
description: 'GCP Managed Instance Group size'
|
||||
required: true
|
||||
|
||||
env:
|
||||
PROJECT_ID: zealous-zebra
|
||||
|
|
Loading…
Reference in New Issue