-
Notifications
You must be signed in to change notification settings - Fork 63
59 lines (49 loc) · 1.54 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
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- uses: mamba-org/[email protected]
with:
environment-file: environment.yml
cache-environment: true
- name: Check formatting
shell: bash -l {0}
run: |
ufmt check flow_matching/ examples/
- name: flake8 lint
shell: bash -l {0}
run: |
flake8 flow_matching
- name: Run tests
shell: bash -l {0}
run: |
coverage run --include='flow_matching/**/*.py' -m unittest discover tests -v
- name: Docstring Lint
shell: bash -l {0}
run: |
pydoclint --style=google flow_matching
- name: Build doc pages
shell: bash -l {0}
working-directory: docs
run: |
micromamba env update --file deps.yml
PYTHONPATH=../:. make html
- name: coverage
shell: bash -l {0}
run: |
pip install coverage-badge
coverage html --include='flow_matching/**/*.py' -d docs/build/html/coverage
coverage-badge -o docs/build/html/coverage/coverage-badge.svg
rm docs/build/html/coverage/.gitignore
- name: Deploy docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/coverage'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html