kopia lustrzana https://github.com/bellingcat/auto-archiver
Switch to ubuntu-22.04 for CI tests
An issue with oscrypto means it currently does not work on 24.04. Ref: https://github.com/wbond/oscrypto/issues/78#issuecomment-2565688091pull/163/head
rodzic
ab2eb3c7f5
commit
8f17a235f3
|
@ -11,7 +11,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.10", "3.11", "3.12"]
|
python-version: ["3.10", "3.11", "3.12"]
|
||||||
|
@ -20,34 +20,19 @@ jobs:
|
||||||
working-directory: ./
|
working-directory: ./
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Poetry
|
||||||
|
run: pipx install poetry
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install Poetry
|
cache: '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
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
run: poetry install --no-interaction --with dev
|
||||||
run: poetry install --no-interaction --no-root --with dev
|
|
||||||
|
|
||||||
- name: Install project
|
- name: Run Core Tests
|
||||||
run: poetry install --no-interaction
|
run: poetry run pytest -ra -v -m "not download"
|
||||||
|
|
||||||
- name: Run Download Tests
|
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
pytest -ra -v -m "download"
|
|
||||||
coverage report
|
|
||||||
|
|
|
@ -10,8 +10,9 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.10"] # only run expensive downloads on one (lowest) python version
|
python-version: ["3.10"] # only run expensive downloads on one (lowest) python version
|
||||||
defaults:
|
defaults:
|
||||||
|
@ -21,34 +22,17 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install poetry
|
||||||
|
run: pipx install poetry
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
cache: 'poetry'
|
||||||
- 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
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
run: poetry install --no-interaction --with dev
|
||||||
run: poetry install --no-interaction --no-root --with dev
|
|
||||||
|
|
||||||
- name: Install project
|
|
||||||
run: poetry install --no-interaction
|
|
||||||
|
|
||||||
- name: Run Download Tests
|
- name: Run Download Tests
|
||||||
run: |
|
run: poetry run pytest -ra -v -m "download"
|
||||||
source .venv/bin/activate
|
|
||||||
pytest -ra -v -m "download"
|
|
||||||
coverage report
|
|
||||||
|
|
Ładowanie…
Reference in New Issue