Skip to content

Commit a45fdea

Browse files
committed
chore(actions): run jobs only for given targets to avoid spam
1 parent 5096622 commit a45fdea

File tree

6 files changed

+87
-29
lines changed

6 files changed

+87
-29
lines changed

.github/workflows/check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Checks
2-
on: [pull_request, push]
2+
on:
3+
push:
4+
pull_request:
5+
branches: [ master ]
6+
workflow_dispatch:
37

48
concurrency:
59
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
name: "CodeQL"
1313

1414
on:
15-
push: null
16-
pull_request: null
15+
push:
16+
pull_request:
1717
schedule:
1818
- cron: "26 6 * * 6"
19+
workflow_dispatch:
1920

2021
concurrency:
2122
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.github/workflows/docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Docs Tests
2+
3+
on:
4+
push:
5+
paths:
6+
- "docs/**"
7+
- "discord/**"
8+
- "test/**"
9+
- "requirements/**"
10+
pull_request:
11+
paths:
12+
- "docs/**"
13+
- "discord/**"
14+
- "test/**"
15+
- "requirements/**"
16+
schedule:
17+
- cron: "0 0 * * *"
18+
workflow_dispatch:
19+
20+
jobs:
21+
docs:
22+
name: "Build Docs"
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/[email protected]
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: "3.8"
30+
cache: "pip"
31+
cache-dependency-path: "requirements/docs.txt"
32+
check-latest: true
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install -U pip
36+
pip install ".[docs]"
37+
- name: Check Links
38+
if: github.event_name == 'schedule'
39+
run: |
40+
cd docs
41+
make linkcheck
42+
- name: Compile to html
43+
run: |
44+
cd docs
45+
make html

.github/workflows/lint.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
name: Type Check and Lint
2-
on: [push, pull_request]
2+
3+
on:
4+
push:
5+
paths:
6+
- "docs/**"
7+
- "discord/**"
8+
- "test/**"
9+
- "requirements/**"
10+
pull_request:
11+
branches: [ master ]
12+
paths:
13+
- "docs/**"
14+
- "discord/**"
15+
- "test/**"
16+
- "requirements/**"
17+
workflow_dispatch:
318

419
concurrency:
520
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.github/workflows/test.yml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,27 @@ name: Unit Tests
22

33
on:
44
push:
5+
paths:
6+
- "discord/**"
7+
- "test/**"
8+
- "requirements/**"
59
pull_request:
10+
branches: [ master ]
11+
paths:
12+
- "discord/**"
13+
- "test/**"
14+
- "requirements/**"
615
schedule:
716
- cron: "0 0 * * *"
17+
workflow_dispatch:
818

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

1323
jobs:
1424
pytest:
25+
name: "Test build with matrix"
1526
runs-on: ${{ matrix.os }}
1627
strategy:
1728
matrix:
@@ -59,27 +70,3 @@ jobs:
5970
name: codecov-umbrella
6071
fail_ci_if_error: true
6172
verbose: true
62-
docs:
63-
runs-on: ubuntu-latest
64-
steps:
65-
- uses: actions/[email protected]
66-
- name: Set up Python ${{ matrix.python-version }}
67-
uses: actions/setup-python@v4
68-
with:
69-
python-version: "3.8"
70-
cache: "pip"
71-
cache-dependency-path: "requirements/docs.txt"
72-
check-latest: true
73-
- name: Install dependencies
74-
run: |
75-
python -m pip install -U pip
76-
pip install ".[docs]"
77-
- name: Check Links
78-
if: github.event_name == 'schedule'
79-
run: |
80-
cd docs
81-
make linkcheck
82-
- name: Compile to html
83-
run: |
84-
cd docs
85-
make html

.github/workflows/todo.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Check TODO
2-
on: [push, pull_request]
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ master ]
7+
workflow_dispatch:
8+
39
jobs:
410
todo:
511
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)