Compile each configuration once, with instrumentation in the package … #762
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: xmsconan | |
| on: [push, pull_request] | |
| jobs: | |
| flake: | |
| name: Flake Project | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-latest] | |
| python-version: ["3.13"] | |
| steps: | |
| # Checkout Sources | |
| - name: Checkout Source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Setup Python | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Install Python Dependencies | |
| - name: Install Python Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 flake8-docstrings flake8-bugbear flake8-import-order pep8-naming | |
| # Flake Code | |
| - name: Run Flake | |
| run: | | |
| flake8 . | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-latest, windows-latest] | |
| python-version: ["3.13"] | |
| steps: | |
| # Checkout Sources | |
| - name: Checkout Source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Setup Python | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Install Python Dependencies | |
| - name: Install Python Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| pip install pytest | |
| # Run Unit Tests | |
| - name: Run Unit Tests | |
| run: | | |
| python -m pytest tests/ -v | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [flake, unit-tests] | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-latest] | |
| python-version: ["3.13"] | |
| steps: | |
| # Checkout Sources | |
| - name: Checkout Source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Setup Python | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Install Python Dependencies | |
| - name: Install Python Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install wheel setuptools setuptools-scm devpi | |
| pip install . | |
| # Get Tag Name | |
| - name: Get Tag | |
| id: gitTag | |
| uses: little-core-labs/get-git-tag@2c292ff564c1a61b989e29f0410d131317f89b03 # v3.0.2 | |
| # Check Tag | |
| - name: Check Tag Against Version | |
| run: | | |
| python -c "from xmsconan import __version__; print('Version: ' + str(__version__) + ' | Tag: ${{ steps.gitTag.outputs.tag }}')" | |
| python -c "from xmsconan import __version__; exit(0 if __version__ == '${{ steps.gitTag.outputs.tag }}' else 1)" | |
| # Build Wheel | |
| - name: Build Wheel and Upload | |
| run: | | |
| python -m pip install --upgrade build | |
| python -m build --wheel | |
| devpi use https://public.aquapi.aquaveo.com/aquaveo/dev/ | |
| devpi login ${{ secrets.AQUAPI_USERNAME_SECRET }} --password ${{ secrets.AQUAPI_PASSWORD_SECRET }} | |
| devpi upload --from-dir dist |