Merge pull request #39 from JLSteenwyk/efficient #351
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: push | |
jobs: | |
test: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@master | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
# make phykit CLI available for tests | |
make install | |
# install test dependencies | |
pip install -r tests/requirements.txt | |
- name: Generate coverage report | |
if: ${{ matrix.python-version == '3.10' }} | |
run: | | |
make test.coverage | |
- name: Upload unit test coverage to Codecov | |
if: ${{ matrix.python-version == '3.10' }} | |
uses: codecov/codecov-action@v1.0.7 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./unit.coverage.xml | |
flags: unit | |
env_vars: PYTHON | |
name: codecov-unit | |
fail_ci_if_error: false | |
- name: Upload integration test coverage to Codecov | |
if: ${{ matrix.python-version == '3.10' }} | |
uses: codecov/codecov-action@v1.0.7 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./integration.coverage.xml | |
flags: integration | |
env_vars: PYTHON | |
name: codecov-integration | |
fail_ci_if_error: false | |
docs: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
- name: Setup Python | |
uses: actions/setup-python@master | |
with: | |
python-version: 3.9 | |
- name: Install pipenv | |
uses: dschep/install-pipenv-action@v1 | |
- name: Build docs | |
run: | | |
cd docs | |
pipenv install | |
pipenv run make html | |
cd .. | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: docs/_build/html |