Skip to content

Update pre-commit hook charliermarsh/ruff-pre-commit to v0.2.0 (#229) #41

Update pre-commit hook charliermarsh/ruff-pre-commit to v0.2.0 (#229)

Update pre-commit hook charliermarsh/ruff-pre-commit to v0.2.0 (#229) #41

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 }}