Update python-ci.yml #3
This file contains hidden or 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: Python CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ✅ Checkout repository | |
uses: actions/checkout@v3 | |
- name: 🐍 Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: 📦 Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: ✅ Lint with flake8 | |
run: | | |
pip install flake8 | |
# exit-zero treats all errors as warnings | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics || true | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true | |
- name: 🔬 Run basic import tests | |
run: | | |
python -c "import sgcv_simulation" | |
python -c "import alp_simulation" | |
python -c "import km_simulation" | |
python -c "import event_generator" | |
python -c "import plot_utils" | |
python -c "import visualize_geometry" |