@@ -109,51 +109,50 @@ jobs:
109
109
run : cargo generate-lockfile
110
110
- name : cargo test
111
111
run : cargo test --locked --all-features --all-targets
112
- # # TODO: Setup code coverage.
113
- # coverage:
114
- # # use llvm-cov to build and collect coverage and outputs in a format that
115
- # # is compatible with codecov.io
116
- # #
117
- # # note that codecov as of v4 requires that CODECOV_TOKEN from
118
- # #
119
- # # https://app.codecov.io/gh/<user or org>/<project>/settings
120
- # #
121
- # # is set in two places on your repo:
122
- # #
123
- # # - https://github.com/jonhoo/guardian/settings/secrets/actions
124
- # # - https://github.com/jonhoo/guardian/settings/secrets/dependabot
125
- # #
126
- # # (the former is needed for codecov uploads to work with Dependabot PRs)
127
- # #
128
- # # PRs coming from forks of your repo will not have access to the token, but
129
- # # for those, codecov allows uploading coverage reports without a token.
130
- # # it's all a little weird and inconvenient. see
131
- # #
132
- # # https://github.com/codecov/feedback/issues/112
133
- # #
134
- # # for lots of more discussion
135
- # runs-on: ubuntu-latest
136
- # name: ubuntu / stable / coverage
137
- # steps:
138
- # - uses: actions/checkout@v4
139
- # with:
140
- # submodules: true
141
- # - name: Install stable
142
- # uses: dtolnay/rust-toolchain@stable
143
- # with:
144
- # components: llvm-tools-preview
145
- # - name: cargo install cargo-llvm-cov
146
- # uses: taiki-e/install-action@cargo-llvm-cov
147
- # - name: cargo generate-lockfile
148
- # if: hashFiles('Cargo.lock') == ''
149
- # run: cargo generate-lockfile
150
- # - name: cargo llvm-cov
151
- # run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info
152
- # - name: Record Rust version
153
- # run: echo "RUST=$(rustc --version)" >> "$GITHUB_ENV"
154
- # - name: Upload to codecov.io
155
- # uses: codecov/codecov-action@v5
156
- # with:
157
- # fail_ci_if_error: true
158
- # token: ${{ secrets.CODECOV_TOKEN }}
159
- # env_vars: OS,RUST
112
+ coverage :
113
+ # use llvm-cov to build and collect coverage and outputs in a format that
114
+ # is compatible with codecov.io
115
+ #
116
+ # note that codecov as of v4 requires that CODECOV_TOKEN from
117
+ #
118
+ # https://app.codecov.io/gh/<user or org>/<project>/settings
119
+ #
120
+ # is set in two places on your repo:
121
+ #
122
+ # - https://github.com/jonhoo/guardian/settings/secrets/actions
123
+ # - https://github.com/jonhoo/guardian/settings/secrets/dependabot
124
+ #
125
+ # (the former is needed for codecov uploads to work with Dependabot PRs)
126
+ #
127
+ # PRs coming from forks of your repo will not have access to the token, but
128
+ # for those, codecov allows uploading coverage reports without a token.
129
+ # it's all a little weird and inconvenient. see
130
+ #
131
+ # https://github.com/codecov/feedback/issues/112
132
+ #
133
+ # for lots of more discussion
134
+ runs-on : ubuntu-latest
135
+ name : ubuntu / stable / coverage
136
+ steps :
137
+ - uses : actions/checkout@v4
138
+ with :
139
+ submodules : true
140
+ - name : Install stable
141
+ uses : dtolnay/rust-toolchain@stable
142
+ with :
143
+ components : llvm-tools-preview
144
+ - name : cargo install cargo-llvm-cov
145
+ uses : taiki-e/install-action@cargo-llvm-cov
146
+ - name : cargo generate-lockfile
147
+ if : hashFiles('Cargo.lock') == ''
148
+ run : cargo generate-lockfile
149
+ - name : cargo llvm-cov
150
+ run : cargo llvm-cov --locked --all-features --lcov --output-path lcov.info
151
+ - name : Record Rust version
152
+ run : echo "RUST=$(rustc --version)" >> "$GITHUB_ENV"
153
+ - name : Upload to codecov.io
154
+ uses : codecov/codecov-action@v5
155
+ with :
156
+ fail_ci_if_error : true
157
+ token : ${{ secrets.CODECOV_TOKEN }}
158
+ env_vars : OS,RUST
0 commit comments