Skip to content

Commit

Permalink
Restrict cron Github Actions tests to run from forks (#3894)
Browse files Browse the repository at this point in the history
Co-authored-by: Bouwe Andela <[email protected]>
  • Loading branch information
valeriupredoi and bouweandela authored Feb 13, 2025
1 parent 5a25987 commit fce554b
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-rtw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
check-rtw:
# The type of runner that the job will run on
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || github.repository == 'ESMValGroup/ESMValTool' # avoid scheduled GHAs in forks

# Steps represent a sequence of tasks that will be executed as part
# of the job
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/citation_file_validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || github.repository == 'ESMValGroup/ESMValTool' # avoid scheduled GHAs in forks
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
create-lock-file:
name: Create conda lock file for latest Python
runs-on: 'ubuntu-latest'
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cron_esmvalbot_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ defaults:
jobs:
run-esmvalbot:
runs-on: 'ubuntu-latest'
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/install-from-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defaults:
jobs:
linux:
runs-on: "ubuntu-latest"
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -53,6 +54,7 @@ jobs:
#
# osx:
# runs-on: "macos-latest"
# if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
# strategy:
# matrix:
# python-version: ["3.10", "3.11"]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/install-from-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ defaults:
jobs:
linux:
runs-on: "ubuntu-latest"
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defaults:
jobs:
linux:
runs-on: "ubuntu-latest"
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
Expand Down Expand Up @@ -56,6 +57,7 @@ jobs:
#
# osx:
# runs-on: "macos-latest"
# if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
# strategy:
# matrix:
# python-version: ["3.10", "3.11"]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-tests-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ defaults:
jobs:
linux:
runs-on: "ubuntu-latest"
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ defaults:
jobs:
linux:
runs-on: "ubuntu-latest"
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defaults:
jobs:
linux:
runs-on: "ubuntu-latest"
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -71,6 +72,7 @@ jobs:

osx:
runs-on: "macos-latest"
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
Expand Down

0 comments on commit fce554b

Please sign in to comment.