Skip to content

Commit

Permalink
Remove Duplicate CI runs
Browse files Browse the repository at this point in the history
When pushing to a PR branch, two CI jobs are running. One for the push,
and one for the pull_request. We don't want this because dups bad,
but also some actions aren't happy if ran twice. Anyways, congrats for
actually reading a commit message, ya legend!
  • Loading branch information
MNThomson committed Oct 13, 2023
1 parent 180643d commit 9e30463
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
name: CI
on: [push, pull_request]

on:
push:
branches: ["master"]
pull_request:

jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

- run: cargo clippy -- -D warnings
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Rust env
uses: ./.github/actions/setup-rust-env

- name: Rust clippy
run: cargo clippy -- -D warnings

rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Install stable toolchain with rustfmt available
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Setup Rust env
uses: ./.github/actions/setup-rust-env

- run: cargo fmt --check
- name: Rust fmt
run: cargo fmt --check

test:
name: Test
Expand Down

0 comments on commit 9e30463

Please sign in to comment.