Skip to content

Commit

Permalink
Update GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed May 21, 2024
1 parent 179303c commit d3a5964
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# The documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# For `pyproject.toml`
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"

# For `ci/latest/requirements.txt`, used in unit-test-latest.yml
- package-ecosystem: "pip"
directory: "/ci/latest"
schedule:
interval: "daily"

# Note: `ci/minimum/requirements.txt` is not updated by Dependabot.

#
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
48 changes: 48 additions & 0 deletions .github/workflows/unit-test-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Run unit tests with latest dependency versions
# This workflow runs the unit tests with the latest versions of the
# dependencies listed in `pyproject.toml`. The latest versions are specified in
# `ci/latest/requirements.txt`. The `requirements.txt` file is updated by
# Dependabot.

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

concurrency:
group: unit-test-latest-${{ github.head_ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
run:
name: Python ${{ matrix.python-version }} on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install packages
run: |
pip install --upgrade pip
pip install -e '.[tests]'
pip install -r ci/latest/requirements.txt
pip list
- name: Run tests
run: pytest -vv --cov --cov-report=xml
52 changes: 52 additions & 0 deletions .github/workflows/unit-test-min.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Run unit tests with oldest dependency versions
# This workflow runs the unit tests with the oldest versions of the
# dependencies listed in `pyproject.toml`. The oldest versions are specified in
# `ci/minimum/requirements.txt`. The `requirements.txt` file is needs to
# be manually updated to be aligned with `pyproject.toml`.
#
# In the future, `pip` might be able to install the minimum versions in
# `pyproject.toml` directly as disscussed in an open issue:
# https://github.com/pypa/pip/issues/8085

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

concurrency:
group: unit-test-min-${{ github.head_ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
run:
name: Python ${{ matrix.python-version }} on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install packages
run: |
pip install --upgrade pip
pip install -e '.[tests]'
pip install -r ci/minimum/requirements.txt
pip list
- name: Run tests
run: pytest -vv --cov --cov-report=xml
16 changes: 16 additions & 0 deletions ci/latest/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The exact requirements of the latest versions of the dependencies. This file
# is used in a GitHub Actions workflow to test the compatibility with the
# latest versions of the dependencies. This file is monitored by Dependabot.
nextline==0.7.5
apluggy==1.0.0
dynaconf==3.2.0
starlette==0.31.0
strawberry-graphql==0.213.0
websockets==12.0.0
rich==13.6.0
async-asgi-testclient==1.4.0
pytest-asyncio==0.21.0
pytest-cov==4.1.0
pytest-timeout==2.2.0
pytest==7.4.0
syrupy==4.6.0
17 changes: 17 additions & 0 deletions ci/minimum/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# The exact requirements of the oldest supported versions of the dependencies.
# This file is used in a GitHub Actions workflow to test the compatibility.
# This file needs to be manually updated to be consistent with
# `pyproject.toml`.
nextline==0.7.5
apluggy==1.0.0
dynaconf==3.2.0
starlette==0.31.0
strawberry-graphql==0.213.0
websockets==12.0.0
rich==13.6.0
async-asgi-testclient==1.4.0
pytest-asyncio==0.21.0
pytest-cov==4.1.0
pytest-timeout==2.2.0
pytest==7.4.0
syrupy==4.6.0

0 comments on commit d3a5964

Please sign in to comment.