added directory structure #11
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 (Build & Test) | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Lint with flake8 (Syntax Check) | |
| run: | | |
| # This checks for "Fatal" errors like undefined variables or syntax errors | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| - name: Run Master Simulation Smoke Test | |
| env: | |
| # 1. Force Matplotlib to use a non-interactive backend | |
| MPLBACKEND: Agg | |
| # 2. Add the current directory to the Python Path | |
| PYTHONPATH: ${{ github.workspace }} | |
| run: | | |
| # Run the ultimate test script | |
| python examples/Chapter9/master_simulation.py |