Skip to content

Use coverall actions instead of python-coveralls #1029

Use coverall actions instead of python-coveralls

Use coverall actions instead of python-coveralls #1029

Workflow file for this run

name: Unittests
on:
pull_request:
push:
branches:
- main
- release_*
jobs:
test:
name: Python ${{ matrix.python-version }} tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox
- name: Run unittests on python${{ matrix.python-version }}
run: python -m tox -e test
- name: Upload pytest html report
uses: actions/upload-artifact@v4
if: failure()
with:
path: __pytest_reports/charon-unit-tests.html
name: charon-unit-tests_python${{ matrix.os.python }}.html
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: python${{ matrix.python-version }}
parallel: true
# - name: Run coveralls-python
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# COVERALLS_FLAG_NAME: python${{ matrix.python-version }}
# COVERALLS_PARALLEL: true
# run: |
# python -m pip install --upgrade coveralls
# python -m coveralls --service=github
# coveralls-finish:
# name: Finish coveralls-python
# needs: test
# runs-on: ubuntu-latest
# steps:
# - name: Finished
# run: |
# pip3 install --upgrade pip setuptools coveralls
# /home/runner/.local/bin/coveralls --finish --service=github
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
github-token: ${{ secrets.GITHUB_TOKEN }}
carryforward: "python3.9, python3.10, python3.11, python3.12"