-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (55 loc) · 2.01 KB
/
test.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
name: Test
on:
push: { branches: [ "master" ] }
pull_request: { branches: [ "master" ] }
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test-flatsurvey:
runs-on: ${{ matrix.on }}
strategy:
matrix:
include:
- on: ubuntu-20.04
python: "3.9"
steps:
- uses: actions/checkout@v2
with: { submodules: recursive }
- uses: conda-incubator/setup-miniconda@v2
with: { miniforge-variant: "Mambaforge", miniforge-version: "latest", python-version: "${{ matrix.python }}" }
- name: install dependencies
shell: bash -el {0}
run: |
mamba env update --quiet -n test -f environment.yml
conda list
- name: install flatsurvey
shell: bash -el {0}
run: |
pip install -e .
- name: doctest
shell: bash -el {0}
run: |
# Make sure that initialization message does not show up in doctest output.
python -c 'import cppyy'
pytest -n auto -x --doctest-modules flatsurvey
- name: run survey
shell: bash -el {0}
run: |
flatsurvey orbit-closure ngons --vertices 3 --limit 7 json
- name: build cache database from previous run
shell: bash -el {0}
run: |
# Shrink cache files by externalizing the referenced surfaces.
mkdir -p pickles
flatsurvey-maintenance externalize-pickles --inplace --pickles pickles/ *.json
# Creata single cache file from the runs.
flatsurvey-maintenance join *.json
cat orbit-closure.json
- name: run survey from cache
shell: bash -el {0}
run: |
# The survey succeeds with the cache enabled.
flatsurvey orbit-closure ngons --vertices 3 --limit 7 local-cache --json orbit-closure.json log
# The survey succeeds without running any computations.
flatsurvey orbit-closure --cache-only ngons --vertices 3 --limit 7 local-cache --json orbit-closure.json log