-
Notifications
You must be signed in to change notification settings - Fork 101
55 lines (47 loc) · 1.39 KB
/
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
53
54
55
name: Test Cesium
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Test cesium
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/setup-python@v1
with:
python-version: "3.8"
- uses: actions/cache@v2
with:
path: |
~/.cache
~/.local
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Checkout branch being tested
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
clean: false
- name: Install dependencies & configure cesium
run: |
pip install --upgrade pip
pip install wheel numpy requests six python-dateutil pytest pytest-cov mock coverage
make install
pip install cython==0.29.23
python setup.py build_ext -i
pip install -e .
which python; python --version
- name: Formatting and linting checks
if: github.ref != 'refs/heads/main'
run: |
pip install pre-commit
pre-commit run --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
- name: Run test suite
run: |
if [[ -n $COVERAGE ]]; then
PYTEST_FLAGS='--cov=./'
fi
PYTHONPATH=. python -m pytest -v $PYTEST_FLAGS