Skip to content

Add support for different time formats #20

Add support for different time formats

Add support for different time formats #20

name: Test Collect Data
on:
workflow_dispatch:
workflow_call:
pull_request:
branches: [ "main" ]
paths:
- '.github/actions/collect_data/**'
jobs:
run-pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Run tests and code coverage
run: |
cd .github/actions/collect_data
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
set -o pipefail # Ensures that the exit code reflects the first command that fails
pytest \
--junitxml=pytest.xml \
--cov-report=term-missing \
--cov=src \
test | tee pytest-coverage.txt
- name: Show reports
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: .github/actions/collect_data/pytest-coverage.txt
junitxml-path: .github/actions/collect_data/pytest.xml
continue-on-error: true