mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-08 03:18:28 +03:00
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: Core Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths:
|
|
- src/**
|
|
- poetry.lock
|
|
- pyproject.toml
|
|
pull_request:
|
|
paths:
|
|
- src/**
|
|
- poetry.lock
|
|
- pyproject.toml
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
os: [ubuntu-22.04, ubuntu-latest]
|
|
defaults:
|
|
run:
|
|
working-directory: ./
|
|
|
|
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 latest Poetry
|
|
run: pipx install poetry
|
|
|
|
- name: Cache Poetry and pip artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/pypoetry
|
|
~/.cache/pip
|
|
key: poetry-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
|
|
|
- name: Install dependencies from source only
|
|
run: poetry install --no-interaction --with dev
|
|
env:
|
|
PIP_NO_BINARY: ":all:"
|
|
|
|
- name: Run Core Tests
|
|
run: |
|
|
poetry run auto-archiver --version || true
|
|
poetry run pytest -ra -v -m "not download"
|