Skip to content

chore(cli): pin dep version for legacy build. #25

chore(cli): pin dep version for legacy build.

chore(cli): pin dep version for legacy build. #25

Workflow file for this run

name: Test and Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
python-version: [3.11, 3.12, 3.13]
os: [ubuntu-latest, macos-latest, macos-14]
exclude:
- os: macos-14
python-version: 3.13
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
COREDUMPY_DUMP_DIR: ${{ github.workspace }}/coredumpy_data
steps:
- uses: actions/checkout@v4
- name: setup pdm
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: install pdm and dependencies
if: matrix.os != 'macos-14'
run: |
pdm lock --group dev --group lsp --group mcp
pdm install
- name: install pdm and dependencies for legacy system
# if: ${{ (matrix.os == 'macos-14') && (matrix.python-version != '3.13') }}
if: matrix.os == 'macos-14'
run: |
pdm lock --group dev --group lsp --group mcp --group legacy
pdm install
- name: run tests
# if: ${{ (matrix.os != 'macos-14') || (matrix.python-version != '3.13') }}
run: pdm run pytest --enable-coredumpy --coredumpy-dir ${{ env.COREDUMPY_DUMP_DIR }}
- name: run coverage
# if: ${{ (matrix.os != 'macos-14') || (matrix.python-version != '3.13') }}
run: |
pdm run coverage run -m pytest
pdm run coverage report -m
pdm run coverage xml -i
- name: upload coverage reports to codecov
# if: ${{ (matrix.os != 'macos-14') || (matrix.python-version != '3.13') }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.codecov_token }}
- name: Upload coredumpy data if applicable
uses: gaogaotiantian/[email protected]
if: failure()
with:
name: coredumpy_data_${{ matrix.os }}_${{ matrix.python-version }}
path: ${{ env.COREDUMPY_DUMP_DIR }}
retention-days: 7