Skip to content

Commit 5ba7b24

Browse files
committed
record coverage while running the conformance tests
1 parent 4eb55ef commit 5ba7b24

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.github/workflows/ci-tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,16 @@ jobs:
123123
- name: Set up Python
124124
uses: actions/setup-python@v6
125125
with:
126-
python-version: 3.12
126+
python-version: 3.14
127127
cache: pip
128-
129128
- name: "Test upgrading CWL conformance tests & running them"
130129
run: ./conformance-test.sh
130+
- name: Upload coverage to Codecov
131+
uses: codecov/codecov-action@v5
132+
with:
133+
fail_ci_if_error: true
134+
token: ${{ secrets.CODECOV_TOKEN }}
135+
131136

132137
release_test:
133138
name: cwl-upgrader release test
@@ -139,7 +144,7 @@ jobs:
139144
- name: Set up Python
140145
uses: actions/setup-python@v6
141146
with:
142-
python-version: 3.12
147+
python-version: 3.14
143148
cache: pip
144149
cache-dependency-path: |
145150
requirements.txt

conformance-test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,18 @@ fi
8484

8585
CONFORMANCE_TEST1="${SCRIPT_DIRECTORY}/common-workflow-language-main/v1.0/conformance_test_v1_0_to_v1_1.yaml"
8686
CONFORMANCE_TEST2="${SCRIPT_DIRECTORY}/common-workflow-language-main/v1.0/conformance_test_v1_0_to_v1_2.yaml"
87+
COVBASE=coverage run --append -m cwlupgrader --rcfile=${SCRIPT_DIRECTORY}/.coveragerc
8788

8889
pushd "${SCRIPT_DIRECTORY}"/common-workflow-language-main/v1.0
8990
cp -r v1.0 v1.1
9091
cp -r v1.0 v1.2
9192
rm v1.1/*.cwl
9293
rm v1.2/*.cwl
9394
set +x
94-
pushd v1.0 ; cwl-upgrader --v1.1-only --dir ../v1.1 --always-write ./*.cwl; popd
95-
pushd v1.0 ; cwl-upgrader --dir ../v1.2 --always-write ./*.cwl; popd
95+
pushd v1.0 ; $COVBASE --v1.1-only --dir ../v1.1 --always-write ./*.cwl; popd
96+
pushd v1.0 ; $COVBASE --dir ../v1.2 --always-write ./*.cwl; popd
9697
set -x
98+
coverage xml
9799
cp conformance_test_v1.0.yaml "${CONFORMANCE_TEST1}"
98100
cp conformance_test_v1.0.yaml "${CONFORMANCE_TEST2}"
99101
sed -i 's=v1.0/=v1.1/=g' "${CONFORMANCE_TEST1}"

cwlupgrader/__main__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Default entry point for the cwl-upgrader module."""
2+
3+
import sys
4+
5+
from . import main
6+
7+
sys.exit(main.main())

0 commit comments

Comments
 (0)