-
-
Notifications
You must be signed in to change notification settings - Fork 24
128 lines (118 loc) · 3.75 KB
/
build.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
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
name: build
on:
push:
branches:
- 'master'
tags:
- '**'
pull_request:
branches:
- '**'
jobs:
tests:
strategy:
fail-fast: false
max-parallel: 5
matrix:
platform: [ubuntu-latest] #, windows-latest]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
include:
- python-version: 3.8
continue-on-error: false
- python-version: 3.9
continue-on-error: false
- python-version: '3.10'
continue-on-error: false
- python-version: 3.11
continue-on-error: false
- python-version: 3.12
continue-on-error: false
# exclude:
# - platform: windows-latest
# python-version: 3.9
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Python (Install Dependencies)
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build coverage setuptools tox
# # Windows
# - name: Windows (Setup MSYS2)
# if: runner.os == 'Windows'
# uses: numworks/setup-msys2@v1
# with:
# msystem: MSYS
# - name: Windows (Setup MSYS2 Dependencies)
# if: runner.os == 'Windows'
# run: msys2do pacman -S --noconfirm mingw-w64-x86_64-aspell mingw-w64-x86_64-aspell-en mingw-w64-x86_64-hunspell mingw-w64-x86_64-hunspell-en
# - name: Windows (Setup Aspell Config)
# if: runner.os == 'Windows'
# shell: bash
# run: |
# spellpath=$(echo "${RUNNER_TEMP}/msys/msys64/mingw64/bin" | sed 's/\\/\//g');
# aconf=$(${spellpath}/aspell config conf-dir | sed 's/\\/\//g');
# ${spellpath}/aspell dump config | sed 's/\\\\/\//g' > ${aconf}/aspell.conf;
# temp=$(${spellpath}/aspell config data-dir | sed 's/\\/\//g');
# echo "data-dir ${temp}" >> ${aconf}/aspell.conf;
# temp=$(${spellpath}/aspell config dict-dir | sed 's/\\/\//g');
# echo "dict-dir ${temp}" >> ${aconf}/aspell.conf
# - name: Windows (Run Tests)
# if: runner.os == 'Windows'
# env:
# TOX_SPELL_PATH: '${{ runner.temp }}\msys\msys64\mingw64\bin'
# TOX_SPELL_REQUIRE: both
# run: |
# python -m tox
# Linux
- name: Linux (Setup Dependencies)
if: runner.os == 'Linux'
run: sudo apt-get install aspell aspell-en hunspell hunspell-en-us
- name: Linux (Run Tests)
if: runner.os == 'Linux'
env:
TOX_SPELL_REQUIRE: both
run: |
python -m tox -e py
continue-on-error: ${{ matrix.continue-on-error }}
# Results
- name: Upload Results
if: success()
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: ${{ matrix.platform }}-${{ matrix.tox-env }}
fail_ci_if_error: false
docs_and_lint:
strategy:
max-parallel: 2
matrix:
tox-env: [documents, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Aspell
if: matrix.tox-env == 'documents'
run: |
sudo apt-get install aspell aspell-en
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build setuptools tox
- name: ${{ matrix.tox-env }}
env:
TOX_MERGE_BASE: "${{ github.event.pull_request.base.sha }}"
run: |
python -m tox -e ${{ matrix.tox-env }}