This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
⬆️ dep-bump(deps): bump pytest in /workspaces/cli #486
Workflow file for this run
This file contains 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: Python package | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
python-lint: | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
platform: [ubuntu-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry>=1.2.0 | |
- name: Install Dependencies | |
run: python -m poetry install | |
- name: Lint | |
run: python -m poetry run bash scripts/lint.sh | |
python-test: | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
platform: [ubuntu-latest] | |
package: [lib, cli] | |
exclude: | |
- python-version: "3.7" | |
package: cli | |
- python-version: "3.8" | |
package: cli | |
- python-version: "3.9" | |
package: cli | |
fail-fast: false | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry>=1.2.0 | |
- name: Test | |
run: make test-isolated-${{ matrix.package }} | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-${{ matrix.package }}-${{ matrix.python-version }} | |
path: reports/.coverage | |
upload-coverage: | |
runs-on: ubuntu-latest | |
needs: [python-test] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install tools | |
run: python -m pip install coverage requests tomli | |
- name: Download coverage reports | |
uses: actions/download-artifact@v3 | |
- name: Combine reports | |
run: | | |
coverage combine $(ls **/.coverage) | |
coverage report | |
coverage xml | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
files: reports/coverage.xml | |
bump-version: | |
runs-on: ubuntu-latest | |
needs: [python-lint, python-test] | |
if: | | |
github.event_name == 'push' && | |
github.ref_name == 'main' && | |
github.ref_type == 'branch' && | |
!startsWith(github.event.head_commit.message, '🔖 bump(release):') && | |
!startsWith(github.event.head_commit.message, 'bump(release):') && | |
!startsWith(github.event.head_commit.message, '🔖 bump:') && | |
!startsWith(github.event.head_commit.message, 'bump:') | |
name: "Bump version and create changelog with commitizen" | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' | |
- name: Create bump and changelog | |
uses: commitizen-tools/commitizen-action@master | |
with: | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
extra_requirements: "cz-conventional-gitmoji" |