Claude/inspiring edison e6k209 #90
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: Run linters and tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check CHANGELOG was updated | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^CHANGELOG.md$"; then | |
| echo "✅ CHANGELOG.md was updated" | |
| else | |
| echo "❌ ERROR: CHANGELOG.md was not updated" | |
| echo "Please add your changes to the CHANGELOG.md file" | |
| exit 1 | |
| fi | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install UV | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: pyproject.toml | |
| - name: Cache pre-commit | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pre-commit- | |
| # Tests are owned by the test job below, so the test hook is skipped here. | |
| - name: Run all checks | |
| env: | |
| SKIP: test | |
| run: uv run --extra async pre-commit run --all-files --verbose | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| include: | |
| # Only this leg has the credentials for the integration tests, so it | |
| # is the one that can meet the coverage threshold. | |
| - python-version: "3.13" | |
| coverage: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install UV | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: pyproject.toml | |
| # Each version resolves to different wheels, so they cannot share one | |
| # cache entry. | |
| cache-suffix: py${{ matrix.python-version }} | |
| - name: Run tests | |
| if: ${{ !matrix.coverage }} | |
| run: uv run --python "${{ matrix.python-version }}" --extra async pytest -rs --no-cov | |
| - name: Run tests with coverage | |
| if: ${{ matrix.coverage }} | |
| env: | |
| AFFILIATE_TAG: ${{ secrets.AFFILIATE_TAG }} | |
| COUNTRY_CODE: ${{ secrets.COUNTRY_CODE }} | |
| CREDENTIAL_ID: ${{ secrets.CREDENTIAL_ID }} | |
| CREDENTIAL_SECRET: ${{ secrets.CREDENTIAL_SECRET }} | |
| API_VERSION: ${{ secrets.API_VERSION }} | |
| run: uv run --python "${{ matrix.python-version }}" --extra async pytest -rs --cov=amazon_creatorsapi |