Just a test #43
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: Circular import check | |
| on: | |
| push: | |
| branches: [master, next] | |
| paths: | |
| - "**.py" | |
| - ".github/workflows/circular-imports.yml" | |
| pull_request: | |
| branches: [master, next] | |
| paths: | |
| - "**.py" | |
| - ".github/workflows/circular-imports.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| circular-imports: | |
| name: circular-imports (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.11", "3.12"] | |
| concurrency: | |
| group: circular-imports-${{ github.ref }}-py${{ matrix.python-version }} | |
| cancel-in-progress: true | |
| env: | |
| # Pin or set to "" to use latest from PyPI | |
| CIRC_DET_VERSION: "==1.0.16" | |
| # If your code is in a subfolder, change this | |
| PROJECT_PATH: "." | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install circular-import-detector | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install "circular-import-detector${CIRC_DET_VERSION}" | |
| - name: Run detector (verbose) and save report | |
| run: | | |
| set -o pipefail | |
| circular-import-detector "$PROJECT_PATH" --verbose --exit-code \ | |
| | tee "circular-import-report-py${{ matrix.python-version }}.txt" | |
| - name: Upload report artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: circular-import-report-py${{ matrix.python-version }} | |
| path: circular-import-report-py${{ matrix.python-version }}.txt |