Update pre-commit hook charliermarsh/ruff-pre-commit to v0.2.0 (#229) #41
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: On push workflows requiring the CNeuroMax image | |
on: | |
push: | |
branches: [main] | |
jobs: | |
on-push-with-image: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout the GitHub repo | |
uses: actions/checkout@v4 | |
- name: Build the CNeuroMax image | |
run: podman build -t cneuromod/cneuromax:latest -f Dockerfile . | |
- name: Push the CNeuroMax image to Docker Hub | |
run: podman push docker.io/cneuromod/cneuromax:latest | |
- name: Build the documentation | |
run: > | |
podman run --rm -v $PWD:/cneuromax -w /cneuromax | |
cneuromod/cneuromax:docs | |
sphinx-build -b html ./docs/ ./docs/build/ | |
- name: Deploy the documentation | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/build/ | |
- name: Run mypy | |
run: > | |
podman run --rm -v $PWD:/cneuromax -w /cneuromax | |
cneuromod/cneuromax:test | |
mypy --config-file=pyproject.toml cneuromax | |
- name: Run pytest | |
run: > | |
podman run --rm -v $PWD:/cneuromax -w /cneuromax | |
cneuromod/cneuromax:test | |
pytest --cov cneuromax | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |