CI/CD Overhaul #110
Workflow file for this run
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: Unit Test | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'master' | |
| tags-ignore: | |
| - v* | |
| pull_request: | |
| branches-ignore: | |
| - 'master' | |
| jobs: | |
| build_and_test: | |
| name: Build and test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| working-directory: ./swmm-toolkit | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| include: | |
| - os: windows-latest | |
| activate: ./build-env/Scripts/activate | |
| - os: macos-latest | |
| activate: source ./build-env/bin/activate | |
| - os: ubuntu-latest | |
| activate: source ./build-env/bin/activate | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Build wheel | |
| run: | | |
| pip install build | |
| python -m build | |
| - name: Upload Wheel | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: swmm_toolkit_${{ matrix.os }} | |
| path: ./swmm-toolkit/dist/*.whl | |
| - name: Test wheel | |
| run: | | |
| pip install -r test-requirements.txt | |
| pip install --no-index --find-links=./dist swmm_toolkit | |
| pytest |