From 12c44ddbf4628784fbdeaf642124ce44a0fbc4ff Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Fri, 4 Aug 2023 21:12:43 -0400 Subject: [PATCH] chore: Update ci.yml in chars --- .github/workflows/ci.yml | 117 ++++++++++++--------------------------- 1 file changed, 34 insertions(+), 83 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f5e3ee..6c7261e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/checkout@v3.5.3 - - 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/checkout@v3.5.3 - - name: "cargo fmt" - uses: actions-rs/cargo@v1 - with: - command: fmt - args: "-v -- --check" - - cargo_deny: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.3 - - name: "cargo deny" - uses: EmbarkStudios/cargo-deny-action@v1 - with: - command: "check all" - - cargo_clippy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.3 - - 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/checkout@v3.5.3 - # - 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"