Files
auto-archiver/.github/workflows/tests-download.yaml
Patrick Robertson 0ce7f5a1b5 Disable caching
2025-03-28 18:40:02 +04:00

50 lines
1.5 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
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:
# For PRs, use the head commit SHA from the triggering workflow
ref: ${{ github.event.workflow_run.head_sha || github.ref }}
# If PR is from a fork, we need fetch-depth: 0
fetch-depth: ${{ github.event.workflow_run.head_repository.fork && '0' || '1' }}
- 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 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 }}