Skip to content

Commit

Permalink
Merge pull request #207 from lsst-sqre/tickets/DM-45138
Browse files Browse the repository at this point in the history
DM-45138: Update GitHub Actions configuration
  • Loading branch information
rra authored Jul 12, 2024
2 parents 31611b3 + 09fa9e3 commit 3f6fbea
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
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

0 comments on commit 3f6fbea

Please sign in to comment.