Skip to content

Commit a485f6e

Browse files
authored
Ensure workflows run on main branch (pyccel#1860)
Change the workflow configuration so the tests are also run on the `main` branch (in addition to `devel`). Further, make sure that the bot reporting is only run on `workflow_dispatch` events. This avoids the results being reported twice when the workflow is triggered by pushes.
1 parent 8445dd7 commit a485f6e

File tree

8 files changed

+24
-16
lines changed

8 files changed

+24
-16
lines changed

.github/workflows/anaconda_linux.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
type: string
1818
push:
19-
branches: devel
19+
branches: [devel, main]
2020

2121
env:
2222
COMMIT: ${{ inputs.ref || github.event.ref }}
@@ -69,6 +69,7 @@ jobs:
6969
with:
7070
mpi_type: openmpi
7171
- name: "Setup"
72+
if: github.event_name != 'push'
7273
id: token
7374
run: |
7475
pip install jwt requests
@@ -108,7 +109,7 @@ jobs:
108109
path: .coverage
109110
retention-days: 1
110111
- name: "Post completed"
111-
if: always()
112+
if: always() && github.event_name != 'push'
112113
run:
113114
python ci_tools/complete_check_run.py ${{ steps.f_c_pytest.outcome }} ${{ steps.python_pytest.outcome }} ${{ steps.parallel.outcome }}
114115
shell: bash -l {0}

.github/workflows/anaconda_windows.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
type: string
1818
push:
19-
branches: devel
19+
branches: [devel, main]
2020

2121
env:
2222
COMMIT: ${{ inputs.ref || github.event.ref }}
@@ -69,6 +69,7 @@ jobs:
6969
with:
7070
mpi_type: msmpi
7171
- name: "Setup"
72+
if: github.event_name != 'push'
7273
id: token
7374
run: |
7475
python -m pip install jwt requests
@@ -88,7 +89,7 @@ jobs:
8889
with:
8990
shell_cmd: 'bash -l -eo pipefail {0}'
9091
- name: "Post completed"
91-
if: always()
92+
if: always() && github.event_name != 'push'
9293
run: |
9394
which python
9495
python --version

.github/workflows/intel.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
type: string
1818
push:
19-
branches: devel
19+
branches: [devel, main]
2020

2121
env:
2222
COMMIT: ${{ inputs.ref || github.event.ref }}
@@ -64,6 +64,7 @@ jobs:
6464
with:
6565
python-version: ${{ needs.Python_version_picker.outputs.python_version }}
6666
- name: "Setup"
67+
if: github.event_name != 'push'
6768
id: token
6869
run: |
6970
pip install jwt requests
@@ -102,6 +103,6 @@ jobs:
102103
path: .coverage
103104
retention-days: 1
104105
- name: "Post completed"
105-
if: always()
106+
if: always() && github.event_name != 'push'
106107
run:
107108
python ci_tools/complete_check_run.py ${{ steps.f_c_pytest.outcome }} ${{ steps.python_pytest.outcome }} ${{ steps.parallel.outcome }} ${{ steps.valgrind.outcome }}

.github/workflows/linux.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
type: string
1818
push:
19-
branches: devel
19+
branches: [devel, main]
2020

2121
env:
2222
COMMIT: ${{ inputs.ref || github.event.ref }}
@@ -67,6 +67,7 @@ jobs:
6767
with:
6868
python-version: ${{ matrix.python_version }}
6969
- name: "Setup"
70+
if: github.event_name != 'push'
7071
id: token
7172
run: |
7273
pip install jwt requests
@@ -105,6 +106,6 @@ jobs:
105106
path: .coverage
106107
retention-days: 1
107108
- name: "Post completed"
108-
if: always()
109+
if: always() && github.event_name != 'push'
109110
run:
110111
python ci_tools/complete_check_run.py ${{ steps.f_c_pytest.outcome }} ${{ steps.python_pytest.outcome }} ${{ steps.parallel.outcome }} ${{ steps.valgrind.outcome }}

.github/workflows/macosx.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
type: string
1818
push:
19-
branches: devel
19+
branches: [devel, main]
2020

2121
env:
2222
COMMIT: ${{ inputs.ref || github.event.ref }}
@@ -63,6 +63,7 @@ jobs:
6363
with:
6464
python-version: ${{ needs.Python_version_picker.outputs.python_version }}
6565
- name: "Setup"
66+
if: github.event_name != 'push'
6667
id: token
6768
run: |
6869
pip install jwt requests
@@ -87,6 +88,6 @@ jobs:
8788
timeout-minutes: 20
8889
uses: ./.github/actions/pytest_parallel
8990
- name: "Post completed"
90-
if: always()
91+
if: always() && github.event_name != 'push'
9192
run:
9293
python ci_tools/complete_check_run.py ${{ steps.f_c_pytest.outcome }} ${{ steps.python_pytest.outcome }} ${{ steps.parallel.outcome }}

.github/workflows/pickle.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
required: false
2020
type: string
2121
push:
22-
branches: devel
22+
branches: [devel, main]
2323

2424
env:
2525
COMMIT: ${{ inputs.ref || github.event.ref }}
@@ -72,6 +72,7 @@ jobs:
7272
with:
7373
python-version: ${{ needs.Python_version_picker.outputs.python_version }}
7474
- name: "Setup"
75+
if: github.event_name != 'push'
7576
id: token
7677
run: |
7778
pip install jwt requests
@@ -99,7 +100,7 @@ jobs:
99100
with:
100101
not_editable: "${{ matrix.editable_string == '-e' && 'False' || 'True' }}"
101102
- name: "Post completed"
102-
if: always()
103+
if: always() && github.event_name != 'push'
103104
run: |
104105
python ci_tools/basic_json_check_output.py --statuses ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} ${{ steps.gFTL_check.outcome}} --reasons "Installation failed." "Pickled files were not found in installaion." "STC was not found during installation." "gFTL was not found during installation."
105106
python ci_tools/complete_check_run.py ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} ${{ steps.gFTL_check.outcome}}

.github/workflows/pickle_wheel.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
type: string
1818
push:
19-
branches: devel
19+
branches: [devel, main]
2020

2121
env:
2222
COMMIT: ${{ inputs.ref || github.event.ref }}
@@ -62,6 +62,7 @@ jobs:
6262
with:
6363
python-version: ${{ needs.Python_version_picker.outputs.python_version }}
6464
- name: "Setup"
65+
if: github.event_name != 'push'
6566
id: token
6667
run: |
6768
pip install jwt requests
@@ -86,7 +87,7 @@ jobs:
8687
id: gFTL_check
8788
uses: ./.github/actions/check_for_gftl
8889
- name: "Post completed"
89-
if: always()
90+
if: always() && github.event_name != 'push'
9091
run: |
9192
python ci_tools/basic_json_check_output.py --statuses ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} ${{ steps.gFTL_check.outcome}} --reasons "Installation failed." "Pickled files were not found in installaion." "STC was not found during installation." "gFTL was not found during installation."
9293
python ci_tools/complete_check_run.py ${{ steps.pickle.outcome }} ${{ steps.pickle_check.outcome }} ${{ steps.stc_check.outcome }} ${{ steps.gFTL_check.outcome}}

.github/workflows/windows.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: false
1717
type: string
1818
push:
19-
branches: devel
19+
branches: [devel, main]
2020

2121
env:
2222
COMMIT: ${{ inputs.ref || github.event.ref }}
@@ -63,6 +63,7 @@ jobs:
6363
with:
6464
python-version: ${{ needs.Python_version_picker.outputs.python_version }}
6565
- name: "Setup"
66+
if: github.event_name != 'push'
6667
id: token
6768
run: |
6869
pip install jwt requests
@@ -90,6 +91,6 @@ jobs:
9091
timeout-minutes: 20
9192
uses: ./.github/actions/pytest_parallel
9293
- name: "Post completed"
93-
if: always()
94+
if: always() && github.event_name != 'push'
9495
run:
9596
python ci_tools/complete_check_run.py ${{ steps.f_c_pytest.outcome }} ${{ steps.python_pytest.outcome }} ${{ steps.parallel.outcome }}

0 commit comments

Comments
 (0)