Skip to content

Commit 5be8b0e

Browse files
authored
Merge PR #2512 to remove reusable workflow logic from CI workflow
Re-using the RMG-Py workflow removes the ability to (easily) run the tests from forks or to target forks, so we will instead copy the testing action and test files to RMG-database. The workflow will be similar but (as mentioned below) can skip some steps.
2 parents 65dfeca + 10a1c33 commit 5be8b0e

File tree

1 file changed

+8
-30
lines changed

1 file changed

+8
-30
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,24 @@ on:
3838
push:
3939
# runs on PRs against RMG-Py (and anywhere else, but we add this for RMG-Py)
4040
pull_request:
41-
# allow calling from other repos in the ReactionMechanismGenerator organization
42-
workflow_call:
43-
inputs:
44-
rmg-db-branch:
45-
# if calling from RMG-database, must provide a branch
46-
required: true
47-
type: string
4841

4942
# this prevents one PR from simultaneously running multiple runners, which will clog up the queue
5043
# and prevent other PRs from running the CI
5144
concurrency:
5245
group: ${{ github.workflow }}-${{ github.ref }}
5346
cancel-in-progress: true
5447

48+
env:
49+
# if running on RMG-Py but requiring changes on an un-merged branch of RMG-database, replace
50+
# main with the name of the branch
51+
RMG_DATABASE_BRANCH: main
52+
53+
5554
jobs:
5655
build-osx:
5756
runs-on: macos-latest
5857
# skip scheduled runs from forks
5958
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
60-
env:
61-
# if running on RMG-Py but requiring changes on an un-merged branch of RMG-database, replace
62-
# main with the name of the branch
63-
RMG_DATABASE_BRANCH: main
6459
defaults:
6560
run:
6661
shell: bash -l {0}
@@ -88,14 +83,7 @@ jobs:
8883
mamba list
8984
9085
# Clone RMG-database
91-
- name: Clone RMG-database - Reusable Workflow
92-
if: github.repository == 'ReactionMechanismGenerator/RMG-database'
93-
run: |
94-
cd ..
95-
git clone -b ${{ inputs.rmg-db-branch }} https://github.com/ReactionMechanismGenerator/RMG-database.git
96-
97-
- name: Clone RMG-database - RMG-Py
98-
if: github.repository != 'ReactionMechanismGenerator/RMG-database'
86+
- name: Clone RMG-database
9987
run: |
10088
cd ..
10189
git clone -b $RMG_DATABASE_BRANCH https://github.com/ReactionMechanismGenerator/RMG-database.git
@@ -118,10 +106,6 @@ jobs:
118106
# skip scheduled runs from forks
119107
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
120108
env:
121-
# if running on RMG-Py but requiring changes on an un-merged branch of RMG-database, replace
122-
# main with the name of the branch
123-
RMG_DATABASE_BRANCH: main
124-
125109
# This is true only if this is a reference case for the regression testing:
126110
REFERENCE_JOB: ${{ github.ref == 'refs/heads/main' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }}
127111
defaults:
@@ -151,13 +135,7 @@ jobs:
151135
mamba list
152136
153137
# Clone RMG-database
154-
- name: Clone RMG-database - Reusable Workflow
155-
if: github.repository == 'ReactionMechanismGenerator/RMG-database'
156-
run: |
157-
cd ..
158-
git clone -b ${{ inputs.rmg-db-branch }} https://github.com/ReactionMechanismGenerator/RMG-database.git
159-
160-
- name: Clone RMG-database - RMG-Py
138+
- name: Clone RMG-database
161139
if: github.repository != 'ReactionMechanismGenerator/RMG-database'
162140
run: |
163141
cd ..

0 commit comments

Comments
 (0)