-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8abd32a
commit 94ccf49
Showing
2 changed files
with
55 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,60 @@ | ||
# GitHub Actions workflow that runs on a cron schedule. | ||
|
||
name: Cron Scheduled CI Tests | ||
name: Weekly cron | ||
|
||
on: | ||
pull_request: | ||
# We also want this workflow triggered if the 'Extra CI' label is added | ||
# or present when PR is updated | ||
types: | ||
- synchronize | ||
- labeled | ||
schedule: | ||
# run at 6am UTC on Mondays | ||
# run every Monday at 6am UTC | ||
- cron: '0 6 * * 1' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# Testing links in documents is a good example of something to run on a schedule | ||
# to catch links that stop working for some reason. | ||
doc_test: | ||
runs-on: ubuntu-latest | ||
tests: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
if: (github.repository == 'astropy/specutils' && (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'Extra CI'))) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
|
||
# We do not use remote data here, since | ||
# that gives too many false positives due to URL timeouts. | ||
- name: Python 3.11 with pre-release version of key dependencies | ||
os: ubuntu-latest | ||
python: '3.11' | ||
toxenv: py311-test-predeps | ||
|
||
- name: Documentation link check | ||
os: ubuntu-latest | ||
python: '3.10' | ||
toxenv: linkcheck | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python to build docs with sphinx | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- name: Install base dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox | ||
- name: Check links in docs using tox | ||
python-version: ${{ matrix.python }} | ||
- name: Install language-pack-de and tzdata | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
tox -e linkcheck | ||
sudo apt-get update | ||
sudo apt-get install language-pack-de tzdata | ||
- name: Install graphviz | ||
if: ${{ matrix.toxenv == 'linkcheck' }} | ||
run: sudo apt-get install graphviz | ||
- name: Install Python dependencies | ||
run: python -m pip install --upgrade tox | ||
- name: Run tests | ||
run: tox ${{ matrix.toxargs}} -e ${{ matrix.toxenv}} -- ${{ matrix.toxposargs}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters