Documentation functions #29
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: Code Format | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
mypy: | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create venv | |
run: python3 -m venv venv | |
- name: Install dependencies | |
run: venv/bin/python -m pip install -e .[dev] | |
- name: Run mypy | |
run: venv/bin/mypy --no-strict-optional | |
pre-commit-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: set PY | |
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- uses: pre-commit/[email protected] | |
# this action also provides an additional behaviour when used in private repositories | |
# when configured with a github token, the action will push back fixes to the pull request branch | |
# with: | |
# token: ${{ secrets.GITHUB_TOKEN }} |