CI Pipeline #39
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: CI Pipeline | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '5 5 */14 * *' | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: | |
- '3.9' # legacy | |
- '3.x' # latest | |
python-package-version: | |
- 'skip' # use poetry selected version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Configure poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: poetry | |
- name: Install dependencies | |
run: poetry install --with dev | |
- name: Install specific python package version | |
if: ${{ matrix.python-package-version != 'skip' }} | |
run: pip install ${{ matrix.python-package-version }} | |
- name: Run tests | |
run: poetry run make tests | |
- name: Publish code coverage | |
uses: paambaati/codeclimate-action@v8.0.0 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
coverageLocations: | | |
${{github.workspace}}/coverage.xml:coverage.py |