-
Notifications
You must be signed in to change notification settings - Fork 8
83 lines (81 loc) · 2.19 KB
/
ci.yaml
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
name: Continuous integration
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
os:
- ubuntu-latest
- macos-latest
exclude: # macos-latest is arm64, which doesn't have these pythons
- os: macos-latest
python-version: "3.9"
- os: macos-latest
python-version: "3.10"
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Update pip
run: pip install -U pip
- name: Install with development dependencies
run: pip install .[cli,dev]
- name: Check with pre-commit
run: pre-commit run --all-files
- name: Test
run: pytest
min-dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Update pip
run: pip install -U pip
- name: Install with development dependencies
run: pip install .[cli,dev]
- name: Install minimum versions of dependencies
run: scripts/install-min-dependencies
- name: Check with pre-commit
run: pre-commit run --all-files
- name: Test
run: pytest
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Update pip
run: pip install -U pip
- name: Install with development dependencies
run: pip install .[cli,dev]
- name: Test with coverage
run: pytest --cov=stac_asset
- name: Upload coverage reports
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}