Use pixi #2161
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: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - rb-* | |
| tags: | |
| - v* | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["310", "311", "312", "313"] | |
| sqlalchemy: ["14"] | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - uses: prefix-dev/setup-pixi@v0.9.1 | |
| with: | |
| pixi-version: v0.49.0 | |
| - name: Test | |
| run: pixi run -e py${{ matrix.python }}-sqla${{ matrix.sqlalchemy }} test-cov | |
| - name: Upload codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - uses: prefix-dev/setup-pixi@v0.9.1 | |
| with: | |
| pixi-version: v0.49.0 | |
| - name: Test | |
| run: pixi run lint | |
| deploy: | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: prefix-dev/setup-pixi@v0.9.1 | |
| with: | |
| pixi-version: v0.49.0 | |
| - name: Build package | |
| run: | | |
| pixi run -e build build | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.pypi_token }} | |
| sonarcloud: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| # Disabling shallow clone is recommended for improving relevancy of reporting | |
| fetch-depth: 0 | |
| - name: SonarCloud Scan | |
| uses: sonarsource/sonarcloud-github-action@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |