@@ -17,28 +17,28 @@ jobs:
17
17
pip install --upgrade pip setuptools wheel
18
18
brew install libxml2 libxmlsec1 pkg-config
19
19
- name : Build macosx_x86_64 wheel
20
+ env :
21
+ CC : clang
22
+ CFLAGS : " -fprofile-instr-generate -fcoverage-mapping"
23
+ LDFLAGS : " -fprofile-instr-generate -fcoverage-mapping"
20
24
run : |
21
25
python setup.py bdist_wheel
26
+ rm -rf build/
22
27
- name : Set environment variables
23
28
shell : bash
24
29
run : |
25
- echo ::set-env name= PKGVER:: $(python setup.py --version)
26
- echo ::set-env name=LLVM_PROFILE_FILE::" pyxmlsec-%p .profraw"
30
+ echo " PKGVER= $(python setup.py --version)" >> $GITHUB_ENV
31
+ echo "LLVM_PROFILE_FILE= pyxmlsec.profraw" >> $GITHUB_ENV
27
32
- name : Install test dependencies
28
- env :
29
- CC : clang
30
- CFLAGS : " -fprofile-instr-generate -fcoverage-mapping"
31
- LDFLAGS : " -fprofile-instr-generate -fcoverage-mapping"
32
33
run : |
33
- rm -rf build/
34
34
pip install coverage --upgrade -r requirements-test.txt
35
35
pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
36
+ echo "PYXMLSEC_LIBFILE=$(python -c 'import xmlsec; print(xmlsec.__file__)')" >> $GITHUB_ENV
36
37
- name : Run tests
37
38
run : |
38
39
coverage run -m pytest -v --color=yes
39
40
- name : Report coverage to codecov
40
41
run : |
41
- LIBFILE=$(python -c "import xmlsec; print(xmlsec.__file__)")
42
- /Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse pyxmlsec-*.profraw -output pyxmlsec.profdata
43
- /Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${LIBFILE} -instr-profile=pyxmlsec.profdata src > coverage.txt
42
+ /Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse ${{ env.LLVM_PROFILE_FILE }} -output pyxmlsec.profdata
43
+ /Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${{ env.PYXMLSEC_LIBFILE }} -instr-profile=pyxmlsec.profdata src > coverage.txt
44
44
bash <(curl -s https://codecov.io/bash) -f coverage.txt
0 commit comments