-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (69 loc) · 1.84 KB
/
CI.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
# This is a basic workflow to help you get started with Actions
name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
env:
PYTHON: 3.9
steps:
- uses: actions/checkout@v3
with:
lfs: 'true'
- name: Set up Python ${{ env.PYTHON }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}
- name: Python info
run: |
which python
python --version
- name: Install Tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Check format
run: tox -e format
- name: Run linters
continue-on-error: true
run: tox -e lint
venv:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ '3.11' ]
experimental: [ false ]
os: [ ubuntu-22.04 ]
steps:
- name: Install system packages
run: |
sudo apt update
sudo apt install libudunits2-dev
- uses: actions/checkout@v3
with:
lfs: 'true'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Python info
run: |
which python
python --version
- name: Cache pip and tox
uses: actions/cache@v3
if: ${{ ! matrix.experimental }}
with:
path: |
~/.cache/pip
~/.cache/srtm
.tox
key: ${{ matrix.os }}-tox-${{ matrix.python-version }}-${{ hashFiles('setup.cfg', 'pyproject.toml') }}
- name: Install Tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run test
continue-on-error: ${{ matrix.experimental }}
run: tox -e py