-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
on: [push, pull_request] | ||
|
||
name: CI | ||
on: | ||
push: | ||
branches-ignore: | ||
- "gh-readonly-queue/**" | ||
pull_request: | ||
merge_group: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
@@ -12,51 +16,57 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --all-features | ||
- uses: dtolnay/[email protected] | ||
- run: cargo check --all-targets --all-features | ||
|
||
fmt: | ||
name: cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- uses: actions-rs/cargo@v1 | ||
- uses: dtolnay/[email protected] | ||
with: | ||
command: fmt | ||
args: --all --check | ||
components: rustfmt | ||
- run: cargo fmt --all --check | ||
|
||
test: | ||
name: cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
- uses: dtolnay/[email protected] | ||
- run: cargo test --all-targets --all-features | ||
|
||
clippy: | ||
name: cargo clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@1.70 | ||
with: | ||
toolchain: stable | ||
- uses: actions-rs/cargo@v1 | ||
components: clippy | ||
- run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
clippy-latest: | ||
name: cargo clippy latest | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
minimal-dependencies: | ||
name: minimal direct dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
components: clippy | ||
- run: cargo check -Z direct-minimal-versions | ||
|
||
docker-image: | ||
name: Docker image build | ||
|
@@ -83,6 +93,7 @@ jobs: | |
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
context: . | ||
push: true | ||
|
@@ -99,6 +110,7 @@ jobs: | |
- test | ||
- clippy | ||
- docker-image | ||
- minimal-dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters