mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-08 03:18:28 +03:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Download Tests
|
|
|
|
on:
|
|
# Schedule this workflow to run every Monday at 14:35 UTC
|
|
schedule:
|
|
- cron: '35 14 * * 1'
|
|
|
|
# For PRs, run the tests-core workflow first
|
|
workflow_run:
|
|
workflows: ["Core Tests"]
|
|
types:
|
|
- completed
|
|
branches: [main]
|
|
paths:
|
|
- src/**
|
|
|
|
jobs:
|
|
tests:
|
|
# Only run if the triggering workflow (tests-core) succeeded
|
|
if: ${{ github.event_name == 'schedule' || github.event.workflow_run.conclusion == 'success' }}
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10"] # only run expensive downloads on one (lowest) python version
|
|
defaults:
|
|
run:
|
|
working-directory: ./
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.workflow_run.head_branch || github.ref }}
|
|
|
|
- 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 }}
|
|
cache: 'poetry'
|
|
|
|
- name: Install dependencies
|
|
run: poetry install --no-interaction --with dev
|
|
|
|
- name: Run Download Tests
|
|
run: poetry run pytest -ra -v -x -m "download"
|
|
env:
|
|
TWITTER_BEARER_TOKEN: ${{ secrets.TWITTER_BEARER_TOKEN }}
|