1010 CARGO_TERM_COLOR : always
1111
1212jobs :
13- # tests-unix:
14- # runs-on: ubuntu-latest
15- # steps:
16- # - uses: actions/checkout@v3
17- # - name: Run tests Unix
18- # working-directory: ./canyon_sql
19- # run: cargo test --verbose
20-
21- # tests-windows:
22- # runs-on: windows-latest
23- # steps:
24- # - uses: actions/checkout@v3
25- # - name: Run tests for Windows
26- # working-directory: ./canyon_sql
27- # run: cargo test --verbose
28-
29- # tests-macos:
30- # runs-on: macos-latest
31- # steps:
32- # - uses: actions/checkout@v3
33- # - name: Run tests for macOS
34- # working-directory: ./canyon_sql
35- # run: cargo test --verbose
36-
3713 gcov :
38- runs-on : ubuntu-latest
39- steps :
40- - uses : actions/checkout@v3
41- - name : Use nightly toolchain
42- run : |
43- rustup toolchain install nightly
44- rustup override set nightly
45- - name : Run tests
46- run : cargo test --all-features --no-fail-fast
47- env :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - name : Use nightly toolchain
19+ run : |
20+ rustup toolchain install nightly
21+ rustup override set nightly
22+
23+ - name : Install grcov
24+ run : cargo install grcov
25+
26+ - name : Run tests
27+ env :
28+ CARGO_INCREMENTAL : ' 0'
29+ RUSTFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
30+ RUSTDOCFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
31+ run : |
32+ cargo test --all-features --no-fail-fast --target=x86_64-unknown-linux-gnu
33+
34+ - name : Generate code coverage report
35+ if : always()
36+ env :
4837 CARGO_INCREMENTAL : ' 0'
4938 RUSTFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
5039 RUSTDOCFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
51- - uses : actions-rs/grcov@v0.1
52- with :
53- config : .github/workflows/configs/gcov-config.yml
54- - name : Publish Test Results
55- uses : EnricoMi/publish-unit-test-result-action@v2
56- if : always()
57- with :
58- junit_files : " test-results/*.xml"
59- - name : Show me directories
60- if : always()
61- run : |
62- ls -la
63- ls -la ./test-results
40+ run : |
41+ grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage
42+ grcov . -s . --binary-path ./target/debug/ -t cobertura --branch --ignore-not-existing -o ./target/debug/coverage/code_cov.xml
43+
44+ - name : Publish Test Results from XML
45+ uses : EnricoMi/publish-unit-test-result-action@v2
46+ if : always()
47+ with :
48+ junit_files : " ./target/debug/coverage/code_cov.xml"
49+
50+ - name : Show me directories
51+ if : always()
52+ run : |
53+ ls -la ./target/debug
54+ ls -la ./target/debug/coverage
55+ ls -la ./target/debug/coverage/badges
56+
57+ - name : Upload
58+ uses : actions/upload-artifact@v3
59+ with :
60+ name : Event File
61+ path : ${{ github.event_path }}
62+ - name : Publish Test Results
63+ uses : actions/upload-artifact@v3
64+ with :
65+ name : Unit Test Results
66+ path : |
67+ ./target/debug/coverage/code_cov.xml
68+ ./target/debug/coverage/index.html
69+
70+ - name : Publish coverage report to GitHub Pages
71+ if : ${{ github.ref == 'refs/heads/main' }}
72+ uses : JamesIves/github-pages-deploy-action@v4
73+ with :
74+ folder : ./target/debug/coverage
0 commit comments