diff --git a/.github/workflows/ci_cron_weekly.yml b/.github/workflows/ci_cron_weekly.yml index e3dfbd4..15d0703 100644 --- a/.github/workflows/ci_cron_weekly.yml +++ b/.github/workflows/ci_cron_weekly.yml @@ -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}} diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 6d3db46..cc23855 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -25,6 +25,11 @@ jobs: python: 3.x toxenv: codestyle + - name: Code style checks + os: ubuntu-latest + python: 3.x + toxenv: build_docs + - name: Python 3.11 with astropy data and coverage os: ubuntu-latest python: '3.11'