forked from materialsproject/crystaltoolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.51 KB
/
pytest-docs.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
name: pytest_and_docs
on: [release, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
# install poetry before setup-python to enable cache retrieval
run: pipx install poetry
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: poetry
- name: Install webdriver and poetry
run: |
sudo apt-get update && sudo apt-get install firefox-geckodriver
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install dependencies
run: poetry install -E server -E fermi
- name: Build new docs
run: |
git config --global user.name 'Matthew Horton'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout "${GITHUB_REF:11}"
cd docs_rst
poetry run make html
- name: Commit new docs
run: |
git add -A
git diff-index --quiet HEAD || git commit -m "Automated doc build"
git push
continue-on-error: true
- name: Test with pytest
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
run: |
poetry run pytest --color=yes --webdriver Firefox --headless crystal_toolkit/apps/examples/tests/