-
-
Notifications
You must be signed in to change notification settings - Fork 8
60 lines (59 loc) · 1.95 KB
/
tests.yaml
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
53
54
55
56
57
58
59
60
name: Tests
on:
push:
branches:
- main
paths:
- lunchable/**
- pyproject.toml
- .github/workflows/tests.yaml
pull_request:
branches: ['**']
paths:
- lunchable/**
- pyproject.toml
- .github/workflows/tests.yaml
schedule:
- cron: 0 12 1 * *
workflow_dispatch:
jobs:
test-suite:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- {name: Python 3.12, python: '3.12'}
- {name: Python 3.11, python: '3.11'}
- {name: Python 3.10, python: '3.10'}
- {name: Python 3.9, python: '3.9'}
- {name: Python 3.8, python: '3.8'}
concurrency:
group: ${{ github.workflow }}-${{ matrix.python }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Set up Github Workspace
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python Environment ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Hatch
run: |
python -m pip install -q --upgrade pip wheel
python -m pip install -q hatch pre-commit
hatch --version
- name: Test Suite
run: |
echo "::add-matcher::.github/workflows/matchers/python.json"
hatch run +py=${{ matrix.python }} all:cov --cov-report=xml tests
echo "::remove-matcher owner=python::"
env:
VCR_RECORD_MODE: none
- name: Upload coverage reports to Codecov
if: matrix.python == '3.11'
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}