Setup multi-repo dev container #93
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
# This workflow runs pre-commit hooks on pushes and pull requests to main | |
# to enforce coding style. To ensure correct configuration, please refer to: | |
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html | |
name: Run pre-commit hooks | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
pre-commit-ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libxml2-utils | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- uses: pre-commit/action@v3.0.1 | |
with: | |
extra_args: --all-files --verbose |