Skip to content

Merge pull request #118 from h2020charisma/ops-improvements #6

Merge pull request #118 from h2020charisma/ops-improvements

Merge pull request #118 from h2020charisma/ops-improvements #6

Workflow file for this run

---
name: CI
on: # yamllint disable-line rule:truthy
push:
branches:
- main
tags:
- v*.*.*
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
env:
default-python: '3.11'
permissions:
pull-requests: write
contents: write
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox-gh-actions
- name: Run tox
run: tox
- name: Produce coverage comment
id: coverage_comment
if: ${{ matrix.python-version }} == ${{ env.default-python }}
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
- name: Store the coverage comment
uses: actions/upload-artifact@v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt