CCL-467: fix CI coverage target and make publishing tag-driven #371
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
| # NOTE: This file is HAND-MAINTAINED in this repository. Do not treat it as | |
| # generated output, even though it originated from OpenAPI Generator. | |
| # | |
| # It intentionally diverges from the upstream copy at | |
| # CentML/platform:client/python/platform_api_python_client/.github/workflows/python.yml, | |
| # which still contains the unrendered `--cov={{packageName}}` template and a | |
| # Python 3.8 matrix entry. | |
| # | |
| # It survives `sync_client.yml` today only because that workflow's `rm -rf *` | |
| # and `cp -r .../*` globs skip dot-paths. CCL-468 proposes switching the copy to | |
| # `cp -r .../.`, which DOES copy dotfiles and would silently revert this file. | |
| # Before that lands, the upstream copies of `.github/workflows/python.yml` and | |
| # `.travis.yml` must be deleted from the platform repo and added to its | |
| # `.openapi-generator-ignore` (see CCL-467, CCL-468, CCL-470). | |
| # | |
| # ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: platform_api_python_client Python package | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r test-requirements.txt | |
| - name: Test with pytest | |
| run: | | |
| pytest --cov=platform_api_python_client |