Merge pull request #14 from ttpss930141011/development #80
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 workflow | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11.8" | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-pip-${{ hashFiles('pyproject.toml') }} | |
- name: Install poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Test with pytest | |
run: | | |
poetry run pytest --cov=src --cov-report=xml | |
- name: Creating coverage folder | |
run: | | |
mkdir -p coverage | |
- name: Coverage Bagdge | |
uses: tj-actions/[email protected] | |
with: | |
output: coverage/coverage.svg | |
- name: Publish coverage report to coverage-badge branch | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: coverage-badge | |
folder: coverage |