Skip to content

Commit 0ebe9c0

Browse files
committed
Make gh actions only run when needed.
This factors the integration jobs back into its own workflow. This is to allow for the pygments module to also have integration tests, and we're ignoring them for status (and thus badges) anyway.
1 parent 5c938a6 commit 0ebe9c0

3 files changed

Lines changed: 57 additions & 25 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: integrations
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the master branch
6+
push:
7+
branches:
8+
- master
9+
paths:
10+
- .github/workflows/fluent.integration.yml
11+
- fluent.syntax/**.py
12+
- fluent.runtime/**.py
13+
pull_request:
14+
branches:
15+
- master
16+
paths:
17+
- .github/workflows/fluent.integration.yml
18+
- fluent.syntax/**.py
19+
- fluent.runtime/**.py
20+
21+
jobs:
22+
integration:
23+
name: fluent.runtime
24+
runs-on: ubuntu-latest
25+
continue-on-error: true
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-python@v2
29+
with:
30+
python-version: 3.7
31+
- name: Install dependencies
32+
working-directory: ./fluent.runtime
33+
run: |
34+
python -m pip install wheel
35+
python -m pip install --upgrade pip
36+
python -m pip install . mock
37+
- name: Install latest fluent.syntax
38+
working-directory: ./fluent.syntax
39+
run: |
40+
python -m pip install .
41+
- name: Test
42+
working-directory: ./fluent.runtime
43+
run: |
44+
./runtests.py

.github/workflows/fluent.runtime.yml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ on:
66
push:
77
branches:
88
- master
9+
paths:
10+
- .github/workflows/fluent.runtime.yml
11+
- fluent.runtime/**.py
912
pull_request:
1013
branches:
1114
- master
15+
paths:
16+
- .github/workflows/fluent.runtime.yml
17+
- fluent.runtime/**.py
1218

1319
jobs:
1420
unit:
@@ -34,30 +40,6 @@ jobs:
3440
working-directory: ./fluent.runtime
3541
run: |
3642
./runtests.py
37-
integration:
38-
name: unit tests
39-
runs-on: ubuntu-latest
40-
continue-on-error: true
41-
steps:
42-
- uses: actions/checkout@v2
43-
- uses: actions/setup-python@v2
44-
with:
45-
python-version: 3.7
46-
- name: Install dependencies
47-
working-directory: ./fluent.runtime
48-
run: |
49-
python -m pip install wheel
50-
python -m pip install --upgrade pip
51-
python -m pip install . mock
52-
- name: Install latest fluent.syntax
53-
working-directory: ./fluent.syntax
54-
run: |
55-
python -m pip install .
56-
- name: Test
57-
working-directory: ./fluent.runtime
58-
run: |
59-
./runtests.py
60-
6143
lint:
6244
name: flake8
6345
runs-on: ubuntu-latest

.github/workflows/fluent.syntax.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ on:
66
push:
77
branches:
88
- master
9+
paths:
10+
- .github/workflows/fluent.syntax.yml
11+
- fluent.syntax/**.py
912
pull_request:
1013
branches:
1114
- master
15+
paths:
16+
- .github/workflows/fluent.syntax.yml
17+
- fluent.syntax/**.py
1218

1319
jobs:
1420
unit:
15-
name: Syntax unit tests
21+
name: unit tests
1622
runs-on: ubuntu-latest
1723
strategy:
1824
matrix:

0 commit comments

Comments
 (0)