Skip to content

Commit

Permalink
Switch to ubuntu-22.04 for CI tests
Browse files Browse the repository at this point in the history
An issue with oscrypto means it currently does not work on 24.04. Ref: wbond/oscrypto#78 (comment)
  • Loading branch information
pjrobertson committed Jan 14, 2025
1 parent ab2eb3c commit 398e8a4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 48 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/tests-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
tests:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
Expand All @@ -21,33 +21,18 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Install Poetry
run: pipx install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-dev
cache: 'poetry'

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with dev

- name: Install project
run: poetry install --no-interaction
run: poetry install --no-interaction --with dev

- name: Run Download Tests
run: |
source .venv/bin/activate
pytest -ra -v -m "download"
coverage report
- name: Run Core Tests
run: poetry run pytest -ra -v -m "not download"
32 changes: 8 additions & 24 deletions .github/workflows/tests-download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ on:

jobs:
tests:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10"] # only run expensive downloads on one (lowest) python version
defaults:
Expand All @@ -21,34 +22,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

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

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-dev
cache: 'poetry'

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with dev

- name: Install project
run: poetry install --no-interaction
run: poetry install --no-interaction --with dev

- name: Run Download Tests
run: |
source .venv/bin/activate
pytest -ra -v -m "download"
coverage report
run: poetry run pytest -ra -v -m "download"

0 comments on commit 398e8a4

Please sign in to comment.