build(deps): Bump actions/checkout from 4.1.2 to 4.1.4 #158
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: Continuous Integration | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
pre-commit-check: | |
name: Pre-Commit Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.4 | |
- uses: actions/setup-python@v5.1.0 | |
- uses: pre-commit/action@v3.0.1 | |
python-build-across-platforms: | |
name: Cross-platform Python Build | |
needs: pre-commit-check | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.9", "3.11"] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4.1.4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- id: cache-dependencies | |
name: Cache dependencies | |
uses: actions/cache@v4.0.2 | |
with: | |
path: ${{ github.workspace }}/.venv | |
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: ${{ matrix.os }}- | |
- name: Install dependencies | |
if: steps.cache-dependencies.cache-hit != 'true' | |
run: | | |
python -m pip install -U pip poetry | |
poetry check --no-interaction | |
poetry config virtualenvs.in-project true | |
poetry install --no-interaction | |
- name: Build artifacts | |
run: | | |
poetry build --no-interaction | |
testing: | |
name: Python Check | |
needs: python-build-across-platforms | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: 3.11 | |
- id: cache-dependencies | |
name: Cache dependencies | |
uses: actions/cache@v4.0.2 | |
with: | |
path: ${{ github.workspace }}/.venv | |
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: ${{ matrix.os }}- | |
- name: Install dependencies | |
if: steps.cache-dependencies.cache-hit != 'true' | |
run: | | |
python -m pip install -U pip poetry | |
poetry check --no-interaction | |
poetry config virtualenvs.in-project true | |
poetry install --no-interaction | |
- name: Run tests | |
run: | | |
git config --global user.email "28790446+rodneyosodo@users.noreply.github.com" | |
git config --global user.name "Rodney Osodo" | |
poetry run coverage run --source=commitgpt -m pytest commitgpt/ | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
- name: Build artifacts | |
run: | | |
poetry build --no-interaction |