Load argument defaults from .githubactivity.json
#190
Workflow file for this run
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: continuous-integration | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 2 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
# ref: https://github.com/pre-commit/action | |
- uses: pre-commit/[email protected] | |
- name: Help message if pre-commit fail | |
if: ${{ failure() }} | |
run: | | |
echo "You can install pre-commit hooks to automatically run formatting" | |
echo "on each commit with:" | |
echo " pre-commit install" | |
echo "or you can run by hand on staged files with" | |
echo " pre-commit run" | |
echo "or after-the-fact on already committed files with" | |
echo " pre-commit run --all-files" | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Only testing 3.8 to avoid too many github API calls | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[testing] | |
- name: Run tests | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: pytest | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[sphinx] | |
- name: Build docs | |
run: | | |
cd docs | |
make dirhtml |