Skip to content

Commit c4122b4

Browse files
authored
Merge pull request #275 from materialsproject/e2e-testing
E2E testing
2 parents 39a2935 + 343c1ea commit c4122b4

22 files changed

+265
-524
lines changed

.github/workflows/pull-request.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pytest
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python 3.8
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: 3.8
18+
cache: poetry
19+
cache-dependency-path: poetry.lock
20+
- name: Install webdriver and poetry
21+
run: |
22+
sudo apt-get update && sudo apt-get install firefox-geckodriver
23+
pip install --upgrade pip && pip install --no-cache-dir poetry
24+
poetry config virtualenvs.in-project false
25+
poetry config virtualenvs.path ~/.virtualenvs
26+
- name: Install dependencies
27+
run: poetry install -E server -E fermi
28+
if: steps.cache.outputs.cache-hit != 'true'
29+
- name: Test with pytest
30+
env:
31+
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
32+
run: |
33+
poetry run pytest --color=yes --webdriver Firefox --headless crystal_toolkit/apps/examples/tests/

.github/workflows/pullrequest.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/pytest-docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: pytest_and_docs
2+
3+
on: [release, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Set up Python 3.8
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: 3.8
15+
- name: Install webdriver and poetry
16+
run: |
17+
sudo apt-get update && sudo apt-get install firefox-geckodriver
18+
pip install --upgrade pip && pip install --no-cache-dir poetry
19+
poetry config virtualenvs.in-project false
20+
poetry config virtualenvs.path ~/.virtualenvs
21+
- name: Install dependencies
22+
run: poetry install -E server -E fermi
23+
if: steps.cache.outputs.cache-hit != 'true'
24+
- name: Build new docs
25+
run: |
26+
git config --global user.name 'Matthew Horton'
27+
git config --global user.email '[email protected]'
28+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
29+
git checkout "${GITHUB_REF:11}"
30+
cd docs_rst
31+
poetry run make html
32+
- name: Commit new docs
33+
run: |
34+
git add -A
35+
git diff-index --quiet HEAD || git commit -m "Automated doc build"
36+
git push
37+
continue-on-error: true
38+
- name: Test with pytest
39+
env:
40+
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
41+
run: |
42+
poetry run pytest --color=yes --webdriver Firefox --headless crystal_toolkit/apps/examples/tests/

.github/workflows/pytest_docs.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
name: release
22

3-
on:
4-
workflow_dispatch
3+
on: workflow_dispatch
54

65
jobs:
76
deploy:
8-
97
runs-on: ubuntu-latest
108

119
steps:
12-
- uses: actions/checkout@v2
13-
with:
14-
ref: main
15-
fetch-depth: 2
16-
- name: Set up Python 3.7
17-
uses: actions/setup-python@v1
18-
with:
19-
python-version: 3.7
20-
- name: Install dependencies
21-
run: |
22-
pip install --upgrade pip && pip install --no-cache-dir poetry
23-
poetry install -E server -E fermi
24-
- name: Build and publish
25-
run: |
26-
poetry build
27-
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
28-
poetry publish
10+
- uses: actions/checkout@v2
11+
with:
12+
ref: main
13+
fetch-depth: 2
14+
- name: Set up Python 3.7
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: 3.7
18+
- name: Install dependencies
19+
run: |
20+
pip install --upgrade pip && pip install --no-cache-dir poetry
21+
poetry install -E server -E fermi
22+
- name: Build and publish
23+
run: |
24+
poetry build
25+
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
26+
poetry publish

0 commit comments

Comments
 (0)