Skip to content

Commit

Permalink
chore: Update ci.yml in chars
Browse files Browse the repository at this point in the history
  • Loading branch information
antifuchs committed Aug 5, 2023
1 parent f3ee1c5 commit 12c44dd
Showing 1 changed file with 34 additions and 83 deletions.
117 changes: 34 additions & 83 deletions .github/workflows/ci.yml
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"

0 comments on commit 12c44dd

Please sign in to comment.