forked from stac-utils/pystac-client
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (108 loc) · 2.97 KB
/
continuous-integration.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install package with dev requirements
run: pip install .[dev]
- name: Run pre-commit
run: pre-commit run --all-files
- name: Run pytest
run: pytest -Werror -s --block-network --cov pystac_client --cov-report term-missing
- name: Run coverage
run: coverage xml
- name: Upload All coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false
min-versions:
name: min-versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
- name: Install with dev requirements
run: pip install .[dev]
- name: Install minimum requirements
run: ./scripts/install-min-requirements
- name: Test
run: ./scripts/test
docs:
name: docs
runs-on: ubuntu-latest
# Required shell entrypoint to have properly activated conda environment
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Setup Conda Environment
uses: conda-incubator/[email protected]
with:
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: 3.9
use-mamba: true
channel-priority: strict
environment-file: ./docs/environment.yml
activate-environment: pystac-client-docs
auto-activate-base: false
- name: Build docs
run: ./scripts/build-docs
pre-release:
name: pre-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
- name: Install
run: pip install .[dev]
- name: Install any pre-releases of pystac
run: pip install -U --pre pystac
- name: Test
run: ./scripts/test
dev-and-docs-requirements:
name: dev and docs requirements check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
- name: Install geos
run: sudo apt -y install libgeos-dev
- name: Install
run: pip install .[dev,docs]