Repository navigation
116 lines (105 loc) · 3.13 KB
/
Copy pathrun_tests.yml
File metadata and controls
116 lines (105 loc) · 3.13 KB
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
name: Test on all platforms
on:
push:
branches:
- dev
- 0.57.x
- 0.58.x
- 0.80.x
- 0.81.x
pull_request:
branches:
- dev
- 0.57.x
- 0.58.x
- 0.80.x
- 0.81.x
jobs:
tests:
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: 3.11
- os: windows-latest
python-version: 3.12
- os: windows-latest
python-version: 3.13
- os: windows-latest
python-version: 3.14
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: 3.11
- os: ubuntu-latest
python-version: 3.12
- os: ubuntu-latest
python-version: 3.13
- os: ubuntu-latest
python-version: 3.14
- os: macos-latest
python-version: "3.10"
- os: macos-latest
python-version: 3.11
- os: macos-latest
python-version: 3.12
- os: macos-latest
python-version: 3.13
- os: macos-latest
python-version: 3.14
steps:
- name: Checkout MPF
uses: actions/checkout@v6
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install jpeg support for pillow
shell: bash
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
choco install libjpeg-turbo
elif [ "${{ runner.os }}" == "Linux" ]; then
# do nothing, Linux works without additional install
sudo apt-get install -y libjpeg-dev
else #must be mac!
brew install libjpeg-turbo
fi
- name: Install MPF
run: |
pip install --upgrade pip setuptools wheel build coveralls
pip install -e .
- name: Run tests
# Oct 15 2023, "coverage" randomly is not recognized as valid on windows
# even though you can see it being installed via pip (from coveralls)?!?
shell: bash # Need bash on windows to use the if statement
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
python3 -m unittest discover -s mpf/tests
else
python3 -m coverage run -m unittest discover -s mpf/tests
fi
- name: Upload coverage data to coveralls.io
if: matrix.os != 'windows-latest'
run: coveralls --service=github-actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}-${{ matrix.os }}
COVERALLS_PARALLEL: true
coveralls:
name: Indicate completion to coveralls.io
needs: tests
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github-actions --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}