Replace mypy with ty (#178) #569
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: conda-self tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".pre-commit-config.yaml" | |
| - ".github/workflows/tests.yml" | |
| - "conda_self/**" | |
| - "pixi.lock" | |
| - "pyproject.toml" | |
| - "recipe/**" | |
| - "tests/**" | |
| pull_request: | |
| paths: | |
| - ".pre-commit-config.yaml" | |
| - ".github/workflows/tests.yml" | |
| - "conda_self/**" | |
| - "pixi.lock" | |
| - "pyproject.toml" | |
| - "recipe/**" | |
| - "tests/**" | |
| concurrency: | |
| # Concurrency group that uses the workflow name and PR number if available | |
| # or commit SHA as a fallback. If a new build is triggered under that | |
| # concurrency group while a previous build is running it will be canceled. | |
| # Repeated pushes to a PR will cancel all previous builds, while multiple | |
| # merges to main will not cancel. | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| typecheck: | |
| name: Type check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 | |
| with: | |
| environments: typecheck | |
| - run: pixi run --environment typecheck typecheck | |
| tests: | |
| name: ${{ matrix.os }}, py${{ matrix.python-version }}, ${{ matrix.channel }} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| TEST_CONDA_CHANNEL: ${{ matrix.channel }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| channel: [defaults, conda-forge] | |
| python-version: ["310", "311", "312", "313", "314"] | |
| include: | |
| - os: macos-latest | |
| channel: defaults | |
| python-version: "313" | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Patch channels in pixi config | |
| if: matrix.channel == 'defaults' | |
| shell: bash | |
| run: | | |
| # Use defaults channel instead of conda-forge | |
| sed -i.bak 's|channels = \["conda-forge"\]|channels = ["https://repo.anaconda.com/pkgs/main", "https://repo.anaconda.com/pkgs/r", "https://repo.anaconda.com/pkgs/msys2"]|g' pyproject.toml | |
| rm pixi.lock | |
| - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 | |
| with: | |
| environments: test-py${{ matrix.python-version }} | |
| - name: Show conda info | |
| run: pixi run --environment test-py${{ matrix.python-version }} python -m conda info | |
| - name: Run tests | |
| run: > | |
| pixi run | |
| --environment test-py${{ matrix.python-version }} | |
| test | |
| -vv | |
| --basetemp=${{ runner.os == 'Windows' && 'D:\temp' || runner.temp }} |