Skip to content

[CONFIG] Node script for github-actions. Split in 2: One for Coverage… #2

[CONFIG] Node script for github-actions. Split in 2: One for Coverage…

[CONFIG] Node script for github-actions. Split in 2: One for Coverage… #2

name: Python CI Tests
on:
push:
branches: [ "main", "develop", "feature/*" ]
pull_request:
branches: [ "main" ]
env:
LOG_LEVEL: INFO
jobs:
build:
name: "Run CI"
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python: ['3.12']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python }}
- name: Install
run: |
pip3 install -r requirements.txt
- name: Test
run: |
coverage run -m pytest --verbose -o log_cli=true --log-cli-level=INFO src/
- name: Coverage
run: |
coverage report
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)