-
Notifications
You must be signed in to change notification settings - Fork 13
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
1 changed file
with
34 additions
and
83 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,84 +1,35 @@ | ||
name: "CI" | ||
# This workflow is triggered on all pushes to the repository, or on Friday night. | ||
on: | ||
pull_request: {} | ||
push: | ||
branches: | ||
- master | ||
- staging | ||
- trying | ||
schedule: | ||
- cron: '0 23 * * FRI' | ||
# This file is automatically generated by terraform. I hope it's | ||
# readable, but please don't edit it. | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust_toolchain: [nightly, stable] | ||
cargo_args: | ||
- "" | ||
# - "--no-default-features --features no_std" | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust_toolchain }} | ||
override: true | ||
profile: minimal | ||
- name: "cargo test" | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: ${{ matrix.cargo_args }} | ||
toolchain: ${{ matrix.rust_toolchain }} | ||
|
||
all_tests: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Mark the job as a success | ||
run: exit 0 | ||
|
||
rustfmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: "cargo fmt" | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: "-v -- --check" | ||
|
||
cargo_deny: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: "cargo deny" | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: "check all" | ||
|
||
cargo_clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- uses: giraffate/clippy-action@v1 | ||
with: | ||
reporter: 'github-pr-review' | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
clippy_flags: -- -D warnings | ||
|
||
# cargo_bench: | ||
# runs-on: ubuntu-latest | ||
# if: github.event_name == 'pull_request' | ||
# needs: test | ||
# steps: | ||
# - uses: actions/[email protected] | ||
# - name: "cargo bench" | ||
# uses: actions-rs/cargo@v1 | ||
# with: | ||
# command: bench | ||
"jobs": | ||
"any_ci": | ||
"runs-on": "ubuntu-latest" | ||
"steps": | ||
- "name": "Immediate success for improved visibility on github merge queue" | ||
"run": "true" | ||
"ci_rust": | ||
"secrets": "inherit" | ||
"uses": "./.github/workflows/ci_rust.yml" | ||
"overall_ci": | ||
"if": "always()" | ||
"needs": | ||
- "ci_rust" | ||
"permissions": | ||
"actions": "read" | ||
"runs-on": "ubuntu-latest" | ||
"steps": | ||
- "env": | ||
"NEEDS_JSON": "${{toJSON(needs)}}" | ||
"name": "Transform outcomes" | ||
"run": | | ||
echo "ALL_SUCCESS=$(echo "$NEEDS_JSON" | jq '. | to_entries | map(.value.result == "success") | all')" >>$GITHUB_ENV | ||
- "name": "check" | ||
"run": "[ $ALL_SUCCESS == true ]" | ||
"name": "CI" | ||
"on": | ||
"merge_group": {} | ||
"pull_request": | ||
"branches": "master" | ||
"push": | ||
"branches": | ||
- "master" |