Skip to content

Commit 1cf54a1

Browse files
committedJun 4, 2022
chore: run unittest with self-hosted
1 parent cc5ac0b commit 1cf54a1

File tree

9 files changed

+42
-55
lines changed

9 files changed

+42
-55
lines changed
 

‎.github/actions/check/action.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ runs:
99
steps:
1010
- name: Setup Build Tool
1111
uses: ./.github/actions/setup_build_tool
12+
with:
13+
bypass_env_vars: RUSTFLAGS,RUST_LOG,GITHUB_TOKEN
1214

1315
- name: Check License Header
1416
shell: bash
@@ -40,4 +42,4 @@ runs:
4042

4143
- name: Check toml format
4244
shell: bash
43-
run: build-tool taplo fmt --check
45+
run: taplo fmt --check

‎.github/actions/setup_build_tool/action.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
bypass_env_vars:
99
description: "Environment variables bypass to docker container"
1010
required: false
11-
default: RUSTFLAGS,RUST_LOG,CARGO_TERM_COLOR,CARGO_INCREMENTAL
11+
default: RUSTFLAGS,RUST_LOG
1212
runs:
1313
using: "composite"
1414
steps:
@@ -31,7 +31,7 @@ runs:
3131
export IMAGE=datafuselabs/build-tool:${{ inputs.image }}
3232
export CARGO_INCREMENTAL=0
3333
export CARGO_TERM_COLOR=always
34-
export BYPASS_ENV_VARS=${{ inputs.bypass_env_vars }}
34+
export BYPASS_ENV_VARS=${{ inputs.bypass_env_vars }},CARGO_INCREMENTAL,CARGO_TERM_COLOR
3535
if [[ \${script_name} == "build-tool" ]]; then
3636
scripts/setup/run_build_tool.sh \$@
3737
else
@@ -42,6 +42,8 @@ runs:
4242
ln -s build-tool $BIN_LOCAL/rustc
4343
ln -s build-tool $BIN_LOCAL/cargo
4444
ln -s build-tool $BIN_LOCAL/rustup
45+
ln -s build-tool $BIN_LOCAL/make
46+
ln -s build-tool $BIN_LOCAL/taplo
4547
4648
- name: check cargo version
4749
shell: bash

‎.github/actions/test_unit/action.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ runs:
1212
with:
1313
swap-size-gb: 4
1414

15-
- name: Maximize build space
16-
uses: ./.github/actions/cleanup
15+
# - name: Maximize build space
16+
# uses: ./.github/actions/cleanup
1717

1818
- name: Setup Build Tool
1919
uses: ./.github/actions/setup_build_tool
2020
with:
21-
bypass_env_vars: RUST_TEST_THREADS,RUST_LOG,RUST_BACKTRACE
21+
bypass_env_vars: RUSTFLAGS,RUSTDOCFLAGS,RUST_TEST_THREADS,RUST_LOG,RUST_BACKTRACE
2222

2323
- shell: bash
2424
run: cargo test --no-fail-fast
@@ -64,7 +64,3 @@ runs:
6464
query/_logs*/
6565
store/_logs*/
6666
.databend/
67-
68-
# for cache
69-
- shell: bash
70-
run: cargo metadata --all-features --format-version 1 > ./target/metadata.json

‎.github/workflows/databend-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- aarch64
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v3
2525
with:
2626
fetch-depth: 0
2727
- name: Get the version
@@ -72,7 +72,7 @@ jobs:
7272
- musl
7373
steps:
7474
- name: Checkout
75-
uses: actions/checkout@v2
75+
uses: actions/checkout@v3
7676
with:
7777
fetch-depth: 0
7878
- name: Get the version
@@ -174,7 +174,7 @@ jobs:
174174
- distroless
175175
steps:
176176
- name: Checkout
177-
uses: actions/checkout@v2
177+
uses: actions/checkout@v3
178178

179179
- name: Get the version
180180
id: get_version

‎.github/workflows/developing.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
check:
3131
runs-on: [self-hosted, x64, Linux]
3232
steps:
33-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v3
3434
with:
3535
# fetch all tags, metasrv and metaclient need tag as its version.
3636
fetch-depth: 0
@@ -47,7 +47,7 @@ jobs:
4747
- x86_64-apple-darwin
4848
- aarch64-apple-darwin
4949
steps:
50-
- uses: actions/checkout@v2
50+
- uses: actions/checkout@v3
5151
with:
5252
# fetch all tags, metasrv and metaclient need tag as its version.
5353
fetch-depth: 0
@@ -65,7 +65,7 @@ jobs:
6565
- x86_64-unknown-linux-gnu
6666
- aarch64-unknown-linux-gnu
6767
steps:
68-
- uses: actions/checkout@v2
68+
- uses: actions/checkout@v3
6969
with:
7070
# fetch all tags, metasrv and metaclient need tag as its version.
7171
fetch-depth: 0
@@ -74,10 +74,10 @@ jobs:
7474
target: ${{ matrix.target }}
7575

7676
test_unit:
77-
runs-on: ubuntu-latest
77+
runs-on: [self-hosted, x64, Linux]
7878
needs: check
7979
steps:
80-
- uses: actions/checkout@v2
80+
- uses: actions/checkout@v3
8181
with:
8282
# fetch all tags, metasrv and metaclient need tag as its version.
8383
fetch-depth: 0
@@ -89,7 +89,7 @@ jobs:
8989
runs-on: ubuntu-latest
9090
needs: build_linux
9191
steps:
92-
- uses: actions/checkout@v2
92+
- uses: actions/checkout@v3
9393
with:
9494
# fetch all tags, metasrv and metaclient need tag as its version.
9595
fetch-depth: 0
@@ -99,7 +99,7 @@ jobs:
9999
runs-on: ubuntu-latest
100100
needs: build_linux
101101
steps:
102-
- uses: actions/checkout@v2
102+
- uses: actions/checkout@v3
103103
with:
104104
# fetch all tags, metasrv and metaclient need tag as its version.
105105
fetch-depth: 0
@@ -109,7 +109,7 @@ jobs:
109109
runs-on: ubuntu-latest
110110
needs: build_linux
111111
steps:
112-
- uses: actions/checkout@v2
112+
- uses: actions/checkout@v3
113113
with:
114114
# fetch all tags, metasrv and metaclient need tag as its version.
115115
fetch-depth: 0
@@ -120,14 +120,14 @@ jobs:
120120
# runs-on: macos-11
121121
# needs: build_macos
122122
# steps:
123-
# - uses: actions/checkout@v2
123+
# - uses: actions/checkout@v3
124124
# - uses: ./.github/actions/test_stateless_standalone_macos
125125

126126
test_stateless_cluster_linux:
127127
runs-on: ubuntu-latest
128128
needs: build_linux
129129
steps:
130-
- uses: actions/checkout@v2
130+
- uses: actions/checkout@v3
131131
with:
132132
# fetch all tags, metasrv and metaclient need tag as its version.
133133
fetch-depth: 0
@@ -137,7 +137,7 @@ jobs:
137137
runs-on: macos-11
138138
needs: build_macos
139139
steps:
140-
- uses: actions/checkout@v2
140+
- uses: actions/checkout@v3
141141
with:
142142
# fetch all tags, metasrv and metaclient need tag as its version.
143143
fetch-depth: 0
@@ -147,7 +147,7 @@ jobs:
147147
runs-on: ubuntu-latest
148148
needs: build_linux
149149
steps:
150-
- uses: actions/checkout@v2
150+
- uses: actions/checkout@v3
151151
with:
152152
# fetch all tags, metasrv and metaclient need tag as its version.
153153
fetch-depth: 0
@@ -157,7 +157,7 @@ jobs:
157157
runs-on: ubuntu-latest
158158
needs: check
159159
steps:
160-
- uses: actions/checkout@v2
160+
- uses: actions/checkout@v3
161161
with:
162162
# fetch all tags, metasrv and metaclient need tag as its version.
163163
fetch-depth: 0

‎.github/workflows/i18n.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414

1515
- name: crowdin action
1616
uses: crowdin/github-action@1.4.9

‎.github/workflows/production.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
check:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
2424
with:
2525
# fetch all tags, metasrv and metaclient need tag as its version.
2626
fetch-depth: 0
@@ -37,7 +37,7 @@ jobs:
3737
- x86_64-apple-darwin
3838
- aarch64-apple-darwin
3939
steps:
40-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v3
4141
with:
4242
# fetch all tags, metasrv and metaclient need tag as its version.
4343
fetch-depth: 0
@@ -55,7 +55,7 @@ jobs:
5555
- x86_64-unknown-linux-gnu
5656
- aarch64-unknown-linux-gnu
5757
steps:
58-
- uses: actions/checkout@v2
58+
- uses: actions/checkout@v3
5959
with:
6060
# fetch all tags, metasrv and metaclient need tag as its version.
6161
fetch-depth: 0
@@ -67,7 +67,7 @@ jobs:
6767
runs-on: ubuntu-latest
6868
needs: check
6969
steps:
70-
- uses: actions/checkout@v2
70+
- uses: actions/checkout@v3
7171
with:
7272
# fetch all tags, metasrv and metaclient need tag as its version.
7373
fetch-depth: 0
@@ -79,7 +79,7 @@ jobs:
7979
runs-on: ubuntu-latest
8080
needs: build_linux
8181
steps:
82-
- uses: actions/checkout@v2
82+
- uses: actions/checkout@v3
8383
with:
8484
# fetch all tags, metasrv and metaclient need tag as its version.
8585
fetch-depth: 0
@@ -91,7 +91,7 @@ jobs:
9191
# runs-on: macos-11
9292
# needs: build_macos
9393
# steps:
94-
# - uses: actions/checkout@v2
94+
# - uses: actions/checkout@v3
9595
# - uses: ./.github/actions/test_stateless_standalone_macos
9696
# with:
9797
# profile: release
@@ -100,7 +100,7 @@ jobs:
100100
runs-on: ubuntu-latest
101101
needs: build_linux
102102
steps:
103-
- uses: actions/checkout@v2
103+
- uses: actions/checkout@v3
104104
with:
105105
# fetch all tags, metasrv and metaclient need tag as its version.
106106
fetch-depth: 0
@@ -112,7 +112,7 @@ jobs:
112112
runs-on: macos-11
113113
needs: build_macos
114114
steps:
115-
- uses: actions/checkout@v2
115+
- uses: actions/checkout@v3
116116
with:
117117
# fetch all tags, metasrv and metaclient need tag as its version.
118118
fetch-depth: 0
@@ -124,7 +124,7 @@ jobs:
124124
runs-on: ubuntu-latest
125125
needs: build_linux
126126
steps:
127-
- uses: actions/checkout@v2
127+
- uses: actions/checkout@v3
128128
with:
129129
# fetch all tags, metasrv and metaclient need tag as its version.
130130
fetch-depth: 0
@@ -145,7 +145,7 @@ jobs:
145145
config:
146146
- { target: x86_64-unknown-linux-gnu, platform: linux/amd64 }
147147
steps:
148-
- uses: actions/checkout@v2
148+
- uses: actions/checkout@v3
149149
with:
150150
# fetch all tags, metasrv and metaclient need tag as its version.
151151
fetch-depth: 0

‎.yamllint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ ignore: |
55
target/
66
77
rules:
8-
# 100 chars should be enough, but don't fail if a line is longer
8+
# 120 chars should be enough, but don't fail if a line is longer
99
line-length:
10-
max: 100
10+
max: 120
1111
level: warning
1212
braces: disable
1313
brackets: disable

‎Makefile

+3-16
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,6 @@ NUM_CPUS ?= 2
77
TENANT_ID ?= "tenant"
88
CLUSTER_ID ?= "test"
99

10-
# yamllint vars
11-
YAML_FILES ?= $(shell find . -path ./target -prune -type f -name '*.yaml' -or -name '*.yml')
12-
YAML_DOCKER_ARGS ?= run --rm --user "$$(id -u)" -v "$${PWD}:/component" --workdir /component
13-
YAMLLINT_ARGS ?= --no-warnings
14-
YAMLLINT_CONFIG ?= .yamllint.yml
15-
YAMLLINT_IMAGE ?= docker.io/cytopia/yamllint:latest
16-
YAMLLINT_DOCKER ?= docker $(YAML_DOCKER_ARGS) $(YAMLLINT_IMAGE)
17-
18-
SKYWALKING_ARGS ?= -v info -c .licenserc.yaml header check
19-
SKYWALKING_DOCKER_ARGS ?= run --rm --user "$$(id -u)" -e GITHUB_TOKEN -v "$${PWD}:/license-eye" --workdir /license-eye
20-
SKYWALKING_IMAGE ?= docker.io/apache/skywalking-eyes:0.3.0
21-
SKYWALKING_DOCKER ?= docker $(SKYWALKING_DOCKER_ARGS) $(SKYWALKING_IMAGE)
22-
2310
CARGO_TARGET_DIR ?= $(CURDIR)/target
2411

2512
# Setup dev toolchain
@@ -39,11 +26,11 @@ lint:
3926
# Bash file formatter(make setup to install)
4027
shfmt -l -w scripts/*
4128

42-
lint-yaml: $(YAML_FILES)
43-
$(YAMLLINT_DOCKER) -f parsable -c $(YAMLLINT_CONFIG) $(YAMLLINT_ARGS) -- $?
29+
lint-yaml:
30+
yamllint -f auto .
4431

4532
check-license:
46-
$(SKYWALKING_DOCKER) $(SKYWALKING_ARGS)
33+
license-eye -v info -c .licenserc.yaml header check
4734

4835
miri:
4936
cargo miri setup

0 commit comments

Comments
 (0)
Please sign in to comment.