Skip to content

Periodic CI

Periodic CI #75

Workflow file for this run

# This is a separate run of the Python test suite that doesn't cache the tox
# environment and runs from a schedule. The purpose is to test compatibility
# with the latest versions of all modules Safir depends on, since Safir (being
# a library) does not pin its dependencies.
name: Periodic CI
env:
# Default Python version used for all jobs other than test, which uses a
# matrix of supported versions. Quote the version to avoid interpretation as
# a floating point number.
PYTHON_VERSION: "3.12"
"on":
schedule:
- cron: "0 12 * * 1"
workflow_dispatch: {}
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python:
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- name: Run tests in nox
uses: lsst-sqre/run-nox@v1
with:
nox-sessions: "update-deps lint typing test"
python-version: ${{ matrix.python }}
use-cache: false
- name: Report status
if: failure()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "Periodic test for {repo} failed"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERT_WEBHOOK }}
docs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install Graphviz
run: sudo apt-get install graphviz
- name: Build docs in nox
uses: lsst-sqre/run-nox@v1
with:
nox-sessions: "docs docs-linkcheck"
python-version: ${{ env.PYTHON_VERSION }}
use-cache: false
- name: Report status
if: failure()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "Periodic documentation test for {repo} failed"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERT_WEBHOOK }}
pypi:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [test, docs]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for setuptools_scm
- name: Test package build of safir
uses: lsst-sqre/build-and-publish-to-pypi@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
upload: false
working-directory: "safir"
- name: Test package build of safir-arq
uses: lsst-sqre/build-and-publish-to-pypi@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
upload: false
working-directory: "safir-arq"
- name: Test package build of safir-logging
uses: lsst-sqre/build-and-publish-to-pypi@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
upload: false
working-directory: "safir-logging"
- name: Report status
if: failure()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "Periodic packaging test for {repo} failed"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERT_WEBHOOK }}