Skip to content

Commit 83bae99

Browse files
evenyagpaomian
authored andcommitted
ci: Skip status check on docs changed (GreptimeTeam#903)
* ci: Pass status check on docs changed * ci: Remove coverage.yml
1 parent ffe7bc0 commit 83bae99

File tree

3 files changed

+98
-70
lines changed

3 files changed

+98
-70
lines changed

.github/workflows/coverage.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/develop.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- '**.md'
88
- '.dockerignore'
99
- 'docker/**'
10+
- '.gitignore'
1011
push:
1112
branches:
1213
- develop
@@ -165,3 +166,45 @@ jobs:
165166
uses: Swatinem/rust-cache@v2
166167
- name: Run cargo clippy
167168
run: cargo clippy --workspace --all-targets -- -D warnings -D clippy::print_stdout -D clippy::print_stderr
169+
170+
coverage:
171+
if: github.event.pull_request.draft == false
172+
runs-on: ubuntu-latest-8-cores
173+
timeout-minutes: 60
174+
steps:
175+
- uses: actions/checkout@v3
176+
- uses: arduino/setup-protoc@v1
177+
with:
178+
repo-token: ${{ secrets.GITHUB_TOKEN }}
179+
- uses: KyleMayes/install-llvm-action@v1
180+
with:
181+
version: "14.0"
182+
- name: Install toolchain
183+
uses: dtolnay/rust-toolchain@master
184+
with:
185+
toolchain: ${{ env.RUST_TOOLCHAIN }}
186+
components: llvm-tools-preview
187+
- name: Rust Cache
188+
uses: Swatinem/rust-cache@v2
189+
- name: Install latest nextest release
190+
uses: taiki-e/install-action@nextest
191+
- name: Install cargo-llvm-cov
192+
uses: taiki-e/install-action@cargo-llvm-cov
193+
- name: Collect coverage data
194+
run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info
195+
env:
196+
CARGO_BUILD_RUSTFLAGS: "-C link-arg=-fuse-ld=lld"
197+
RUST_BACKTRACE: 1
198+
CARGO_INCREMENTAL: 0
199+
GT_S3_BUCKET: ${{ secrets.S3_BUCKET }}
200+
GT_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
201+
GT_S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
202+
UNITTEST_LOG_DIR: "__unittest_logs"
203+
- name: Codecov upload
204+
uses: codecov/codecov-action@v2
205+
with:
206+
token: ${{ secrets.CODECOV_TOKEN }}
207+
files: ./lcov.info
208+
flags: rust
209+
fail_ci_if_error: true
210+
verbose: true

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
on:
2+
pull_request:
3+
types: [opened, synchronize, reopened, ready_for_review]
4+
paths:
5+
- 'docs/**'
6+
- 'config/**'
7+
- '**.md'
8+
- '.dockerignore'
9+
- 'docker/**'
10+
- '.gitignore'
11+
push:
12+
branches:
13+
- develop
14+
- main
15+
paths:
16+
- 'docs/**'
17+
- 'config/**'
18+
- '**.md'
19+
- '.dockerignore'
20+
- 'docker/**'
21+
- '.gitignore'
22+
workflow_dispatch:
23+
24+
name: CI
25+
26+
# To pass the required status check, see:
27+
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
28+
29+
jobs:
30+
check:
31+
name: Check
32+
if: github.event.pull_request.draft == false
33+
runs-on: ubuntu-latest
34+
steps:
35+
- run: 'echo "No action required"'
36+
37+
fmt:
38+
name: Rustfmt
39+
if: github.event.pull_request.draft == false
40+
runs-on: ubuntu-latest
41+
steps:
42+
- run: 'echo "No action required"'
43+
44+
clippy:
45+
name: Clippy
46+
if: github.event.pull_request.draft == false
47+
runs-on: ubuntu-latest
48+
steps:
49+
- run: 'echo "No action required"'
50+
51+
coverage:
52+
if: github.event.pull_request.draft == false
53+
runs-on: ubuntu-latest
54+
steps:
55+
- run: 'echo "No action required"'

0 commit comments

Comments
 (0)