fix: fix Minimal Tests workflow for OSS repo structure #12
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: Minimal Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| concurrency: | |
| group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| env: | |
| FORCE_COLOR: "1" | |
| jobs: | |
| minimal_tests: | |
| name: Minimal Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| python-version: ["3.10"] | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python/ | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # pre-commit checks handled by pre-commit.ci | |
| - name: Run tests | |
| run: | | |
| uv run coverage run --rcfile=pyproject.toml --source=. -m \ | |
| pytest -x -vv --ignore=tests/integration_tests -m "not snowflake and not bigquery and not trino and not postgres" | |
| - name: Generate coverage report | |
| run: | | |
| uv run coverage report -m | |
| uv run coverage xml | |
| - name: Git fetch unshallow | |
| working-directory: . | |
| run: git fetch --unshallow | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarcloud-github-action@master | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| with: | |
| projectBaseDir: ./ | |
| args: > | |
| -Dproject.settings=./sonar-project.properties |