-
Notifications
You must be signed in to change notification settings - Fork 59
52 lines (50 loc) · 1.53 KB
/
ci-tests.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
name: tests
on:
push:
branches: ['**']
jobs:
pytest:
strategy:
fail-fast: false
matrix:
config:
- python-version: '3.8'
tox: py38
- python-version: '3.9'
tox: py39
- python-version: '3.10'
tox: py310
- python-version: '3.11'
tox: py311
poetry-version: [ "1.8.2" ]
os: [ ubuntu-22.04, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.config.python-version }} / Poetry ${{ matrix.poetry-version }} / ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install poetry
run: pipx install poetry
- name: Install Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python-version }}
cache: 'poetry'
- name: Install packages
run: poetry install --no-root
- name: Load cached tox
uses: actions/cache@v3
with:
path: .tox
key: tox-${{ matrix.os }}-poetry-${{ matrix.poetry-version }}-python-${{ matrix.config.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Setup API Key
env:
ORS_API_KEY: ${{ secrets.ORS_API_KEY }}
run: printf "[ORS]\napiKey = $ORS_API_KEY\n" > tests-config.ini
- name: Run tox
run: |
poetry run tox -e pytest-${{ matrix.config.tox }}