Refactor parser #88
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: Pre-commit and docs build check | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
pre-commit-and-docs: | |
runs-on: [ubuntu-latest] | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
- name: create venv and install dependencies | |
run: | | |
rm -r /tmp/kazu-env || true | |
PIP_CACHE_DIR=$(pip cache dir) | |
echo "pip cache dir is "${PIP_CACHE_DIR} | |
python -m venv /tmp/kazu-env | |
. /tmp/kazu-env/bin/activate | |
python -m pip install --upgrade pip | |
pip install --upgrade --upgrade-strategy eager --index-url https://download.pytorch.org/whl/cpu "torch>=2.0.0" | |
pip install -e ."[dev]" --cache-dir $PIP_CACHE_DIR --upgrade --upgrade-strategy eager | |
- name: Check precommit | |
run: | | |
. /tmp/kazu-env/bin/activate | |
pre-commit run --all-files | |
- name: Check docs build successfully | |
# still run even if the pre-commit fails, so we | |
# have the output on if the docs build succeeded or not | |
if: "!cancelled()" | |
run: | | |
. /tmp/kazu-env/bin/activate | |
make -C docs html | |
# need to call twice, for NFS bug | |
rm -r /tmp/kazu-env || true | |
rm -r /tmp/kazu-env || true |