-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (73 loc) · 2.19 KB
/
ci.yml
File metadata and controls
90 lines (73 loc) · 2.19 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
name: TreeMapper CI
on:
pull_request:
branches: [ '**' ]
push:
branches:
- main
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest ]
python-version: [ 3.9, '3.10', '3.11' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip Dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Build with PyInstaller
run: |
python -m PyInstaller --clean -y --dist ./dist/${{ runner.os }} --workpath /tmp treemapper.spec
- name: Build with python -m build
run: |
python -m build
- name: Run Tests
run: |
pytest
test-pypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ pypy-3.9 ]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up PyPy ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip Dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pypy-pip-${{ hashFiles('**/setup.cfg') }}
restore-keys: |
pypy-pip-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install build pytest
- name: Build with python -m build
run: |
python -m build
- name: Run Tests
run: |
pytest