-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·66 lines (56 loc) · 1.66 KB
/
main.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
name: check
on:
push:
paths:
- "OiRunner/**"
- "tests/**"
- "setup.py"
- ".github/workflows/**"
pull_request:
paths:
- "OiRunner/**"
- "tests/**"
- "setup.py"
- ".github/workflows/**"
jobs:
build:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install gdb
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install gdb
- name: Install g++
if: matrix.os == 'windows-latest'
run: |
choco install mingw -y --no-progress
$env:PATH += ";C:\tools\mingw64\bin"
set PYTHONIOENCODING=utf-8
- name: Check environment
run: |
g++ --version
gcc --version
gdb --version
- name: Install dependencies in ${{ matrix.python-version }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint in ${{ matrix.python-version }}
run: |
flake8 OiRunner/ tests/ --count --statistics --max-line-length=127
mypy OiRunner/
- name: tests in ${{ matrix.python-version }}
run: coverage run --source OiRunner -m unittest
- name: Get report in ${{ matrix.python-version }}
run: coverage report