-
-
Notifications
You must be signed in to change notification settings - Fork 3
135 lines (134 loc) · 5.04 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Tests
on:
push:
branches:
- main
paths:
- hatch_pip_compile/**
- pyproject.toml
- .github/workflows/tests.yaml
- tests/**
pull_request:
branches: ["**"]
paths:
- hatch_pip_compile/**
- pyproject.toml
- .github/workflows/tests.yaml
- tests/**
schedule:
- cron: 0 12 1 * *
jobs:
test-suite:
strategy:
fail-fast: true
matrix:
include:
- {
name: Python-3.12,
python: "3.12",
command: "matrix:cov",
matrix: "+py=3.12",
hatch_version: "1.0",
os: ubuntu-latest,
}
- {
name: Python-3.11,
python: "3.11",
command: "matrix:cov",
matrix: "+py=3.11",
hatch_version: "1.0",
os: ubuntu-latest,
}
- {
name: Python-3.10,
python: "3.10",
command: "matrix:cov",
matrix: "+py=3.10",
hatch_version: "1.0",
os: ubuntu-latest,
}
- {
name: Python-3.9,
python: "3.9",
command: "matrix:cov",
matrix: "+py=3.9",
hatch_version: "1.0",
os: ubuntu-latest,
}
- {
name: Python-3.8,
python: "3.8",
command: "matrix:cov",
matrix: "+py=3.8",
hatch_version: "1.0",
os: ubuntu-latest,
}
- {
name: Hatch-1.7.x,
python: "3.11",
command: "versions:cov",
matrix: "+version=1.7.x",
hatch_version: "1.7.0",
os: ubuntu-latest,
}
- {
name: Hatch-1.8.x,
python: "3.11",
command: "versions:cov",
matrix: "+version=1.8.x",
hatch_version: "1.8.0",
os: ubuntu-latest,
}
- {
name: Hatch-1.9.x,
python: "3.11",
command: "versions:cov",
matrix: "+version=1.9.x",
hatch_version: "1.9.0",
os: ubuntu-latest,
}
- {
name: Hatch-Windows,
python: "3.11",
command: "matrix:cov",
matrix: "+py=3.11",
hatch_version: "1.0",
os: windows-latest,
}
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ matrix.name }}-${{ github.ref }}
cancel-in-progress: true
env:
PIP_COMPILE_DISABLE: 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@v4
with:
python-version: ${{ matrix.python }}
- name: Install Default Python
if: matrix.python != '3.11'
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip wheel
python -m pip install -q "hatch~=${{ matrix.hatch_version }}"
python -m pip install -q pre-commit
python -m pip install -q "${{ github.workspace }}"
hatch --version
- name: Test Suite
run: |
echo "::add-matcher::.github/workflows/matchers/python.json"
hatch run ${{ matrix.matrix }} ${{ matrix.command }} --cov-report=xml tests/ -vv
echo "::remove-matcher owner=python::"
- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.11' && matrix.command == 'matrix:cov'
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}