Skip to content

ci: remove redundant runs on different python versions, unify env init #24

ci: remove redundant runs on different python versions, unify env init

ci: remove redundant runs on different python versions, unify env init #24

Workflow file for this run

name: Tests on PR
on:
pull_request:
workflow_dispatch:
concurrency:
group: tests-on-pr-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests-on-pr:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out libdiffpy
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up C++ tests
uses: ./.github/actions/setup-tests
- name: Build and run C++ tests with coverage
run: |
"$CONDA_PREFIX/bin/c++" --version
scons -j4 build=coverage test
- name: Generate coverage report
run: >-
gcovr --gcov-executable "$CONDA_PREFIX/bin/gcov"
--root . --filter 'build/coverage-.*/diffpy/'
--xml coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage.xml
verbose: true
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}