-
Notifications
You must be signed in to change notification settings - Fork 87
52 lines (51 loc) · 1.81 KB
/
test.yml
File metadata and controls
52 lines (51 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: pytest
on:
push:
branches:
- main
pull_request:
branches:
- '*'
# Nightly cron and a manual trigger so the full corpus (slow lane
# included) runs at least once a day. PR runs stay on the fast lane
# via `-m "not slow"`; this job has no such filter and exercises
# every fixture in the golden corpus, including the heavier
# compression cells. See issue #1930 for the fast / slow split.
#
# GitHub Actions only fires `schedule` triggers on the workflow file
# in the default branch. The cron will not run from a feature branch
# or PR head -- use `workflow_dispatch` below for an on-demand run.
schedule:
# 03:00 UTC daily. Off-peak to avoid contention with weekday PRs.
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python: ${{ github.event_name == 'pull_request' && fromJson('["3.14"]') || fromJson('["3.12", "3.13", "3.14"]') }}
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Run pytest (fast lane)
# PR triggers run the fast lane: `-m "not slow"` deselects the
# heavier corpus cells tagged via `_marks.fast_slow_marks_for`
# (today: the six compression fixtures). push-to-main and the
# nightly schedule run the full set with no filter.
if: github.event_name == 'pull_request'
run: pytest -m "not slow"
- name: Run pytest (full)
if: github.event_name != 'pull_request'
run: pytest