-
Notifications
You must be signed in to change notification settings - Fork 141
71 lines (58 loc) · 1.77 KB
/
ci.yml
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
name: bandersnatch_ci
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build:
name: bandersnatch CI python ${{ matrix.python-version }} on ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.11", "3.12"]
os: [macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install latest pip, setuptools + tox
run: |
python -m pip install --upgrade pip setuptools tox
- name: Install base bandersnatch requirements
run: |
python -m pip install -r requirements.txt
- name: Run Unittests
env:
TOXENV: py3
os: ${{ matrix.os }}
run: |
python test_runner.py
- name: Upload coverage to Codecov
# If pushed / is a pull request against main repo.
if: (github.event_name == 'push' && github.repository == 'pypa/bandersnatch') || (github.event.pull_request.base.repo.full_name == 'pypa/bandersnatch')
uses: codecov/codecov-action@v4
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
with:
env_vars: OS,PYTHON
files: coverage.xml
- name: Run Integration Test
env:
TOXENV: INTEGRATION
run: |
python -m pip install .
python test_runner.py
- name: Run Integration Test (uvloop)
if: matrix.os != 'windows-latest'
env:
TOXENV: INTEGRATION
run: |
python -m pip install .[uvloop]
python test_runner.py