-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (49 loc) · 1.39 KB
/
ci.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
name: ci
on: [push, pull_request]
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
name: test
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir -r requirements.txt
pip install --no-cache-dir -r requirements-dev.txt
- name: check env
run : |
pip freeze
- name: run black
run: |
black . --check --verbose || echo "return 0"
- name: run pylint
run : |
pylint tencirchem example tests || echo "return 0"
- name: test scripts
run: |
pytest tencirchem tests --durations=0 --cov=tencirchem
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: run examples
run: |
cd example; bash run.sh
cd ..
- name: test build doc
run: |
sudo apt install pandoc
cd docs
make html
touch ./build/html/.nojekyll
- name: doc to pages 🚀
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/build/html