Skip to content

Commit

Permalink
ci: merge from init-conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ben1009 committed Jan 10, 2024
1 parent d77deba commit 3d1407a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 43 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ on:
push:
branches: [main, master]
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
RUST_TOOLCHAIN: nightly-2023-12-11

name: Check
jobs:
fmt:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [nightly-2023-12-11]
name: fmt
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
Expand All @@ -36,20 +37,18 @@ jobs:
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
- run: cargo fmt --check

clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
name: clippy
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
toolchain: [nightly-2023-12-11]
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -59,10 +58,10 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
- name: Install ${{ env.RUST_TOOLCHAIN }}
uses: dtolnay/rust-toolchain@master # master
with:
toolchain: ${{ matrix.toolchain }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/safety.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ jobs:
# run: cargo test --release --test loom
# env:
# LOOM_MAX_PREEMPTIONS: 2
# RUSTFLAGS: "--cfg loom"
# RUSTFLAGS: "--cfg loom"
2 changes: 1 addition & 1 deletion .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
if: hashFiles('Cargo.lock') != ''
run: cargo nextest run --locked --all-features --all-targets
env:
RUSTFLAGS: -D deprecated
RUSTFLAGS: -D deprecated
27 changes: 12 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ on:
push:
branches: [main, master]
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
RUST_TOOLCHAIN: nightly-2023-12-11

name: Test
jobs:
required:
runs-on: ubuntu-latest
name: ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [nightly-2023-12-11]
name: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -28,10 +28,10 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
- name: Install ${{ env.RUST_TOOLCHAIN }}
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295 # master
with:
toolchain: ${{ matrix.toolchain }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
Expand All @@ -42,14 +42,14 @@ jobs:
uses: taiki-e/install-action@nextest
- name: cargo nextest --locked
run: cargo nextest run --locked --workspace --all-features --all-targets

os-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / nightly
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
toolchain: [nightly-2023-12-11]
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
Expand All @@ -74,10 +74,7 @@ jobs:
run: cargo nextest run --locked --all-features --all-targets
coverage:
runs-on: ubuntu-latest
name: ubuntu / nightly / coverage
strategy:
matrix:
toolchain: [nightly-2023-12-11]
name: coverage
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -90,7 +87,7 @@ jobs:
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: llvm-tools-preview
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@29ee91bbad05696171dd917a8c7a3838049b93d5 # cargo-llvm-cov
Expand All @@ -106,4 +103,4 @@ jobs:
- name: Upload to codecov.io
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
fail_ci_if_error: true
fail_ci_if_error: true
23 changes: 5 additions & 18 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,12 @@ pull_request_rules:
- name: Automatic merge on approval
conditions:
- -conflict
- check-success=dependency-review
- check-success=stable / fmt
- check-success=ubuntu / nightly
- check-success=sanitizers
- check-success=ubuntu / stable
- check-success=ubuntu / beta
- check-success=stable / clippy
- check-success=ubuntu / beta / updated
- check-success=miri
- check-success=macos-latest / stable
- check-success=beta / clippy
- check-success=windows-latest / stable
- check-success=nightly / doc
- check-success=ubuntu / stable / coverage
- check-success=ubuntu / stable / features
- check-success=ubuntu / 1.56.1
- check-success=codecov/patch
- check-success=codecov/project
- check-success=fmt
- check-success=clippy
- check-success=typos
- check-success=coverage
- check-success=ubuntu-latest
- check-success=macos-latest

actions:
merge:
Expand Down

0 comments on commit 3d1407a

Please sign in to comment.