Skip to content

Merge pull request #38 from nova-rey/codex/add-mini-ci-workflows-for-… #3

Merge pull request #38 from nova-rey/codex/add-mini-ci-workflows-for-…

Merge pull request #38 from nova-rey/codex/add-mini-ci-workflows-for-… #3

Workflow file for this run

name: Coverage (Py3.11)
on: { push: {}, pull_request: {}, workflow_dispatch: {} }
permissions: { contents: read }
jobs:
cov:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- name: Install pytest + cov
run: |
python -m pip install -U pip
pip install pytest pytest-cov
- name: Determine coverage targets
id: cov
shell: bash
run: |
COV_MODS=""
[ -d "crapssim" ] && COV_MODS="$COV_MODS --cov=crapssim"
[ -d "crapssim_api" ] && COV_MODS="$COV_MODS --cov=crapssim_api"
echo "mods=$COV_MODS" >> $GITHUB_OUTPUT
- name: Run pytest with coverage

Check failure on line 24 in .github/workflows/coverage.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/coverage.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
env: { PYTHONPATH: ${{ github.workspace }}, PYTHONHASHSEED: '0' }
run: |
mkdir -p reports
if ls tests/**/*.py tests/*.py >/dev/null 2>&1; then
pytest -q ${{ steps.cov.outputs.mods }} --cov-report=xml:coverage.xml -m "not stress"
else
echo '<coverage version="0"/>' > coverage.xml
fi
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-xml
path: coverage.xml