update project URLs #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: [ '3.8', '3.9', '3.10' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache test fixtures | |
id: cache-test-fixtures | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/tests/fixtures/wannier90-* | |
key: ${{ runner.os }}-${{ hashFiles('tests/fixtures/*') }}_0 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -r requirements/dev-requirements.txt | |
pip install . | |
- name: Make fixtures | |
if: steps.cache-test-fixtures.outputs.cache-hit != 'true' | |
run: | | |
make -C ./tests/fixtures | |
- name: Run tests | |
run: | | |
pytest -v | |
docs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.7' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements/dev-requirements.txt | |
pip install . | |
- name: Build docs | |
run: | | |
mkdocs build | |
- name: Publish docs | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site/ | |
force_orphan: true |