Skip to content

Added code cov

Added code cov #6

Workflow file for this run

name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
permissions:
contents: read
env:
PYTHON_VERSIONS: '["3.8", "3.9", "3.10", "3.11", "3.12"]'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ${{fromJson(env.PYTHON_VERSIONS)}}

Check failure on line 23 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 23, Col: 25): Unrecognized named-value: 'env'. Located at position 10 within expression: fromJson(env.PYTHON_VERSIONS) .github/workflows/ci.yml (Line: 23, Col: 25): Unexpected value '${{fromJson(env.PYTHON_VERSIONS)}}'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set MAX_PYTHON_VERSION env variable
run: |
echo "MAX_PYTHON_VERSION=$(echo '${{ env.PYTHON_VERSIONS }}' | jq -r '.[-1]')" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install --upgrade pip setuptools
pip install -r requirements.txt
- name: Install test dependencies
run: |
pip install -r test-requirements.txt
- name: Run Pylama
run: |
pylama * -i E501
- name: Run Unit Tests
run: |
coverage run -m unittest discover
- name: Upload coverage reports to Codecov
if: env.MAX_PYTHON_VERSION == matrix.python-version
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}