Skip to content

Commit 062b2b9

Browse files
ci: try combining push and pr jobs without dupes (!)
1 parent 30e61d7 commit 062b2b9

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
name: CI (push)
2-
3-
on: [push]
1+
name: CI
42

3+
on: [push, pull_request]
54
jobs:
5+
6+
block-autosquash-commits:
7+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/[email protected]
11+
- name: Block merging fixup commits
12+
uses: ErichDonGubler/block-fixup-merge-action@patch-1
13+
614
check:
715
name: Check
16+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
817
runs-on: ${{ matrix.os }}
918
strategy:
1019
matrix:
@@ -29,6 +38,7 @@ jobs:
2938

3039
test:
3140
name: Test Suite
41+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
3242
runs-on: ${{ matrix.os }}
3343
strategy:
3444
matrix:
@@ -53,6 +63,7 @@ jobs:
5363

5464
fmt:
5565
name: Rustfmt
66+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
5667
runs-on: ubuntu-latest
5768
strategy:
5869
matrix:
@@ -77,6 +88,7 @@ jobs:
7788

7889
clippy:
7990
name: Clippy
91+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
8092
runs-on: ubuntu-latest
8193
strategy:
8294
matrix:
@@ -102,6 +114,7 @@ jobs:
102114

103115
rustdoc:
104116
name: Documentation
117+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
105118
runs-on: ubuntu-latest
106119
strategy:
107120
matrix:
@@ -128,6 +141,7 @@ jobs:
128141
args: --all-features --no-deps
129142

130143
cargo-deny:
144+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
131145
runs-on: ubuntu-latest
132146
steps:
133147
- uses: actions/[email protected]

.github/workflows/pr.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)