⬆️🐍 Lock file maintenance (#333) #582
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
| # this file is heavily based on https://github.com/cda-tum/mqt-workflows/blob/main/.github/workflows/reusable-python-ci.yml | |
| name: 🐍 • CI | |
| on: | |
| merge_group: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "src/aigverse/**" | |
| - "test/**" | |
| - "**/*.py" | |
| - "**/*.hpp" | |
| - "**/*.cpp" | |
| - "**/*.cmake" | |
| - "**/CMakeLists.txt" | |
| - "libs/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/aigverse-python-tests.yml" | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - "src/aigverse/**" | |
| - "test/**" | |
| - "**/*.py" | |
| - "**/*.hpp" | |
| - "**/*.cpp" | |
| - "**/*.cmake" | |
| - "**/CMakeLists.txt" | |
| - "libs/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/aigverse-python-tests.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: 🚨 Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | |
| with: | |
| enable-cache: true | |
| save-cache: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Run ty | |
| run: uvx prek run -a ty-check | |
| - name: Run check-sdist | |
| run: uvx check-sdist --inject-junk | |
| python-tests: | |
| name: 🐍 ${{ matrix.runs-on }} | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2025] | |
| steps: | |
| - name: Clone Repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - if: runner.os == 'Linux' | |
| name: Setup mold | |
| uses: rui314/setup-mold@v1 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | |
| with: | |
| enable-cache: true | |
| save-cache: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install sccache | |
| run: uv tool install sccache | |
| - name: 🐍 Test | |
| run: uvx nox -s tests --verbose | |
| - name: Show sccache stats | |
| run: sccache --show-stats |