Skip to content

Commit

Permalink
ci: attempt to trigger test run only once
Browse files Browse the repository at this point in the history
  • Loading branch information
timvw committed Mar 29, 2024
1 parent a9741db commit 87b84fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
name: "Test Suite"
on:
push:
branches-ignore:
- 'dependabot/**' #avoid duplicates: only run the PR, not the push
- 'renovate/**' #avoid duplicates: only run the PR, not the push
- 'gh-pages' #github pages do not trigger all tests
tags-ignore:
- 'v*' #avoid rerun existing commit on release
pull_request:
branches:
- 'main'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
if: (github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request' && (github.event.pull_request.head.repo.fork || startsWith(github.head_ref, 'dependabot/') || startsWith(github.head_ref, 'renovate/')))
name: cargo test
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -40,6 +49,7 @@ jobs:

# Check formatting with rustfmt
formatting:
if: (github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request' && (github.event.pull_request.head.repo.fork || startsWith(github.head_ref, 'dependabot/') || startsWith(github.head_ref, 'renovate/')))
name: cargo fmt
runs-on: ubuntu-latest
steps:
Expand All @@ -52,6 +62,7 @@ jobs:
uses: actions-rust-lang/rustfmt@v1

lint:
if: (github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request' && (github.event.pull_request.head.repo.fork || startsWith(github.head_ref, 'dependabot/') || startsWith(github.head_ref, 'renovate/')))
name: cargo clippy
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 87b84fd

Please sign in to comment.