Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-45138: Update GitHub Actions configuration #207

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: 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":
merge_group: {}
pull_request: {}
Expand Down Expand Up @@ -28,7 +35,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: ${{ env.PYTHON_VERSION }}

- name: Run pre-commit
uses: pre-commit/[email protected]
Expand All @@ -37,20 +44,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10

strategy:
matrix:
python:
- "3.12"

steps:
- uses: actions/checkout@v4

- name: Run tox
uses: lsst-sqre/run-tox@v1
with:
python-version: ${{ matrix.python }}
python-version: ${{ env.PYTHON_VERSION }}
tox-envs: "py,coverage-report,typing"
tox-plugins: "tox-docker tox-uv"
tox-requirements: requirements/tox.txt

build:
runs-on: ubuntu-latest
Expand Down
34 changes: 20 additions & 14 deletions .github/workflows/periodic-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

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"
Expand All @@ -15,33 +22,32 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10

strategy:
matrix:
python:
- "3.12"

steps:
- uses: actions/checkout@v4

# Use the oldest supported version of Python to update dependencies,
# not the matrixed Python version, since this accurately reflects
# how dependencies should later be updated.
- name: Run neophile
uses: lsst-sqre/run-neophile@v1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
mode: update
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: Run tests in tox
uses: lsst-sqre/run-tox@v1
with:
python-version: ${{ matrix.python }}
tox-envs: "lint,typing,py"
tox-requirements: requirements/tox.txt
use-cache: false
tox-plugins: "tox-docker tox-uv"

- name: Report status
if: always()
if: failure()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
Expand Down