Periodic CI #41
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 runs from a schedule, | |
# doesn't cache the tox environment, and updates pinned dependencies first. | |
# The purpose is to test compatibility with the latest versions of | |
# dependencies. | |
name: Periodic CI | |
"on": | |
schedule: | |
- cron: "0 12 * * 1" | |
workflow_dispatch: {} | |
env: | |
PYTHON_VERSION: "3.12" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
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: Start Kafka | |
run: docker compose -f kafka-compose.yaml up -d | |
- name: Run tests in tox | |
uses: lsst-sqre/run-tox@v1 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
tox-envs: "lint,typing,py" | |
tox-requirements: requirements/tox.txt | |
use-cache: false | |
- name: Stop Kafka | |
run: docker compose -f kafka-compose.yaml down | |
- 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 }} |