Periodic CI #62
Workflow file for this run
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
# 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 whether | |
# updating pinned dependencies would cause any tests to fail. | |
name: Periodic CI | |
env: | |
# Current supported Python version. For applications, there is generally no | |
# reason to support multiple Python versions, so all actions are run with | |
# this version. 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: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Update dependencies | |
run: | | |
pip install --upgrade uv | |
uv venv | |
source .venv/bin/activate | |
make update-deps | |
shell: bash | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
cache-dependency-path: ui/package-lock.json | |
- name: Read .nvmrc | |
id: node_version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
# First try to restore the fully-installed node modules. If that works | |
# (no changes to the JavaScript layer), skip npm i and restoring the | |
# cache of downloaded modules. If that fails, restore the cache of the | |
# downloaded modules and then run npm clean-install. | |
- name: Cache installed Node modules | |
uses: actions/cache@v4 | |
id: node-cache | |
with: | |
path: ./ui/node_modules | |
key: node-${{ steps.node_version.outputs.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} | |
# --legacy-peer-deps is currently required because react-aria-modal | |
# hasn't been updated for the latest React. | |
- name: Install Node dependencies | |
run: npm ci --legacy-peer-deps | |
if: steps.node-cache.outputs.cache-hit != 'true' | |
working-directory: ./ui | |
- name: Update package lists | |
run: sudo apt-get update | |
- name: Install extra packages | |
run: sudo apt install -y graphviz libpq-dev libldap2-dev libsasl2-dev | |
- name: Build the UI | |
run: npm run build | |
working-directory: ./ui | |
- name: Set up Minikube | |
uses: medyagh/setup-minikube@v0.0.18 | |
with: | |
kubernetes-version: "v1.27.3" | |
- uses: lsst-sqre/run-tox@tickets/DM-46034 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
tox-envs: "lint,typing,py-full,docs,docs-linkcheck" | |
tox-requirements: "requirements/tox.txt" | |
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 }} |