File tree Expand file tree Collapse file tree 2 files changed +45
-5
lines changed
Expand file tree Collapse file tree 2 files changed +45
-5
lines changed Original file line number Diff line number Diff line change 66 - published
77 workflow_dispatch :
88 inputs :
9- release-id :
9+ tag :
1010 required : true
1111
1212concurrency :
13- group : cd/crates/${{ github.event.release.tag_name || github.event.inputs.release-id }}
13+ group : cd/crates/${{ github.event.release.tag_name || github.event.inputs.tag }}
1414 cancel-in-progress : true
1515
1616jobs :
1919 steps :
2020 - uses : actions/checkout@v4
2121 with :
22- ref : ${{ github.event.release.tag_name || github.event.inputs.release-id }}
22+ ref : ${{ github.event.release.tag_name || github.event.inputs.tag }}
2323 - uses : dtolnay/rust-toolchain@stable
2424 - uses : katyo/publish-crates@v2
2525 with :
Original file line number Diff line number Diff line change 7676 - uses : dtolnay/rust-toolchain@stable
7777 - run : cargo run --all-features -- git --version
7878
79- coverage :
79+ coverage-unit :
8080 strategy :
8181 matrix :
8282 os : [ubuntu-latest, macos-latest]
9292 parallel : true
9393 flag-name : ${{ matrix.os }}
9494
95+ coverage-integration :
96+ strategy :
97+ matrix :
98+ os : [ubuntu-latest, macos-latest]
99+ runs-on : ${{ matrix.os }}
100+ steps :
101+ - uses : actions/checkout@v4
102+ - uses : dtolnay/rust-toolchain@stable
103+
104+ - name : build
105+ run : |
106+ RUSTFLAGS="-C instrument-coverage" cargo build
107+ echo "$PWD/target/debug" >> $GITHUB_PATH
108+
109+ - name : run integrations
110+ run : |
111+ pkgx --help
112+ pkgx --version
113+ pkgx +git
114+ pkgx +git --json
115+ pkgx git --version
116+
117+ - name : generate coverage
118+ run : |
119+ cargo install rustfilt
120+ pkgx +llvm.org -- llvm-profdata merge -sparse default_*.profraw -o default.profdata
121+ pkgx +llvm.org -- llvm-cov export \
122+ ./target/debug/pkgx \
123+ --format=lcov \
124+ --ignore-filename-regex="$HOME/.cargo" \
125+ --instr-profile=default.profdata \
126+ -Xdemangler=rustfilt \
127+ > lcov.info
128+
129+ - uses : coverallsapp/github-action@v2
130+ with :
131+ path-to-lcov : lcov.info
132+ parallel : true
133+ flag-name : ${{ matrix.os }}
134+
95135 upload-coverage :
96- needs : coverage
136+ needs : [ coverage-unit, coverage-integration]
97137 if : ${{ always() }}
98138 runs-on : ubuntu-latest
99139 steps :
You can’t perform that action at this time.
0 commit comments