File tree Expand file tree Collapse file tree 4 files changed +72
-5
lines changed Expand file tree Collapse file tree 4 files changed +72
-5
lines changed Original file line number Diff line number Diff line change 1- name : build
1+ name : build_v1
22on :
33 push :
44 branches :
55 - main
6+ paths-ignore :
7+ - ' v2/**'
68 pull_request :
79jobs :
810 checks :
3133 uses : morphy2k/revive-action@v2
3234
3335 - name : build
34- run : ./scripts/test .sh
36+ run : ./scripts/test_v1 .sh
3537 env :
3638 LARK_APP_ID : ${{ secrets.LARK_APP_ID }}
3739 LARK_APP_SECRET : ${{ secrets.LARK_APP_SECRET }}
Original file line number Diff line number Diff line change 1+ name : build_v2
2+ on :
3+ push :
4+ branches :
5+ - main
6+ paths :
7+ - ' v2/**'
8+ pull_request :
9+ jobs :
10+ checks :
11+ name : run
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : checkout
15+ uses : actions/checkout@v3
16+
17+ - name : cache
18+ uses : actions/cache@v3
19+ with :
20+ path : |
21+ ~/.cache/go-build
22+ ~/go/pkg/mod
23+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
24+ restore-keys : |
25+ ${{ runner.os }}-go-
26+
27+ - name : setup
28+ uses : actions/setup-go@v3
29+ with :
30+ go-version : ' 1.13.0'
31+
32+ - name : lint
33+ uses : morphy2k/revive-action@v2
34+
35+ - name : build
36+ run : ./scripts/test_v2.sh
37+ env :
38+ LARK_APP_ID : ${{ secrets.LARK_APP_ID }}
39+ LARK_APP_SECRET : ${{ secrets.LARK_APP_SECRET }}
40+ LARK_USER_EMAIL : ${{ secrets.LARK_USER_EMAIL }}
41+ LARK_CHAT_ID : ${{ secrets.LARK_CHAT_ID }}
42+ LARK_OPEN_ID : ${{ secrets.LARK_OPEN_ID }}
43+ LARK_USER_ID : ${{ secrets.LARK_USER_ID }}
44+ LARK_UNION_ID : ${{ secrets.LARK_UNION_ID }}
45+ LARK_MESSAGE_ID : ${{ secrets.LARK_MESSAGE_ID }}
46+ LARK_WEBHOOK : ${{ secrets.LARK_WEBHOOK_V2 }}
47+ LARK_WEBHOOK_SIGNED : ${{ secrets.LARK_WEBHOOK_V2_SIGNED }}
48+
49+ - name : codecov
50+ uses : codecov/codecov-action@v1
51+ with :
52+ token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33set -e
4- echo " mode: atomic" > coverage.txt
4+ echo " mode: atomic" > coverage.txt
55
66go test -coverprofile=profile.out -covermode=atomic ./...
77if [ -f profile.out ]; then
8- tail -q -n +2 profile.out >> coverage.txt
9- rm profile.out
8+ tail -q -n +2 profile.out >> coverage.txt
9+ rm profile.out
1010fi
1111
1212go tool cover -func coverage.txt
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+ echo " mode: atomic" > coverage.txt
5+
6+ cd ./v2
7+ go test -coverprofile=profile.out -covermode=atomic ./...
8+ if [ -f profile.out ]; then
9+ tail -q -n +2 profile.out >> coverage.txt
10+ rm profile.out
11+ fi
12+
13+ go tool cover -func coverage.txt
You can’t perform that action at this time.
0 commit comments