-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (76 loc) · 2.4 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
72
73
74
75
76
77
name: CI
on:
- push
- pull_request
jobs:
test:
strategy:
matrix:
platform:
- Linux
- macOS
- Windows
toxenv:
- py39
- py310
- py311
- py312
include:
- platform: Linux
os: ubuntu-latest
- platform: macOS
os: macos-latest
- platform: Windows
os: windows-latest
- toxenv: py39
python-version: '3.9'
- toxenv: py310
python-version: '3.10'
- toxenv: py311
python-version: '3.11'
- toxenv: py312
python-version: '3.12'
fail-fast: false
name: tox -e ${{ matrix.toxenv }} on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
TOXENV: ${{ matrix.toxenv }}
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U coverage tox
- name: Install VCSes on Linux
if: matrix.platform == 'Linux'
run: sudo apt install brz darcs fossil
- name: Install VCSes on macOS
if: matrix.platform == 'macOS'
run: brew install breezy darcs fossil mercurial
- name: Install VCSes on Windows
if: matrix.platform == 'Windows'
run: |
aria2c -q -o fossil.zip 'https://www.fossil-scm.org/home/uv/fossil-w64-2.24.zip'
Expand-Archive fossil.zip $env:ProgramFiles\Fossil
echo $env:ProgramFiles\Fossil >>$env:GITHUB_PATH
$uri = 'https://darcs.net/binaries/windows/'
mkdir $env:ProgramFiles\Darcs | Out-Null
Invoke-WebRequest ($uri + ((Invoke-WebRequest $uri).Links | Where-Object { $_.Href -match '\.exe$' } | Select-Object -Last 1).Href) -OutFile $env:ProgramFiles\Darcs\darcs.exe
echo $env:ProgramFiles\Darcs >>$env:GITHUB_PATH
- name: Test
run: tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: TOXENV
fail_ci_if_error: true
flags: ${{ matrix.platform }}