Skip to content

Commit 8382b72

Browse files
Merge pull request #22 from emperror/improve-project
Improve project
2 parents 8d9379a + 41979d3 commit 8382b72

4 files changed

Lines changed: 40 additions & 25 deletions

File tree

.github/workflows/checks.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
build:
1010
name: FOSSA
1111
runs-on: ubuntu-latest
12+
env:
13+
GOFLAGS: -mod=readonly
14+
PLZ_ARGS: -p
1215

1316
steps:
1417
- name: Set up Go
@@ -19,15 +22,16 @@ jobs:
1922
- name: Set up GOPATH
2023
run: echo "::set-env name=GOPATH::$(go env GOPATH)"
2124

25+
- name: Set Please overrides
26+
run: echo "::set-env name=PLZ_OVERRIDES::build.path:$PATH"
27+
2228
- name: Checkout code
2329
uses: actions/checkout@v2
2430

2531
- name: Build
2632
run: go build ./...
27-
env:
28-
GOFLAGS: -mod=readonly
2933

3034
- name: Analyze
31-
run: ./pleasew run ///pleasings2//tools/misc:fossa -- analyze
35+
run: ./pleasew $PLZ_ARGS run ///pleasings2//tools/misc:fossa -- analyze
3236
env:
3337
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

.github/workflows/ci.yml

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ on:
77
pull_request:
88

99
jobs:
10-
lint:
11-
name: Lint
10+
test:
11+
name: Test
1212
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
go: ['1.11', '1.12', '1.13', '1.14', '1.15']
1316
env:
1417
GOFLAGS: -mod=readonly
1518
GOPROXY: https://proxy.golang.org
@@ -19,20 +22,32 @@ jobs:
1922
- name: Set up Go
2023
uses: actions/setup-go@v2
2124
with:
22-
go-version: 1.15
25+
go-version: ${{ matrix.go }}
26+
27+
- name: Set Please overrides
28+
run: echo "::set-env name=PLZ_OVERRIDES::build.path:$PATH"
2329

2430
- name: Checkout code
2531
uses: actions/checkout@v2
2632

27-
- name: Lint
28-
run: ./pleasew $PLZ_ARGS lint
33+
- name: Build
34+
run: ./pleasew $PLZ_ARGS build //...
2935

30-
test:
31-
name: Test
36+
- name: Test
37+
run: |
38+
./pleasew $PLZ_ARGS test //...
39+
./pleasew $PLZ_ARGS gotest
40+
41+
- name: Upload coverage
42+
uses: codecov/codecov-action@v1
43+
if: always()
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
file: plz-out/log/coverage.txt
47+
48+
lint:
49+
name: Lint
3250
runs-on: ubuntu-latest
33-
strategy:
34-
matrix:
35-
go: ['1.11', '1.12', '1.13', '1.14', '1.15']
3651
env:
3752
GOFLAGS: -mod=readonly
3853
GOPROXY: https://proxy.golang.org
@@ -42,17 +57,13 @@ jobs:
4257
- name: Set up Go
4358
uses: actions/setup-go@v2
4459
with:
45-
go-version: ${{ matrix.go }}
60+
go-version: 1.15
61+
62+
- name: Set Please overrides
63+
run: echo "::set-env name=PLZ_OVERRIDES::build.path:$PATH"
4664

4765
- name: Checkout code
4866
uses: actions/checkout@v2
4967

50-
- name: Test
51-
run: ./pleasew $PLZ_ARGS gotest
52-
53-
- name: Upload coverage
54-
uses: codecov/codecov-action@v1
55-
if: always()
56-
with:
57-
token: ${{ secrets.CODECOV_TOKEN }}
58-
file: plz-out/log/coverage.txt
68+
- name: Lint
69+
run: ./pleasew $PLZ_ARGS lint

.plzconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[please]
2-
version = 15.4.0
2+
version = 15.5.0
33

44
[go]
55
importpath = emperror.dev/errors

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
github_repo(
22
name = "pleasings2",
33
repo = "sagikazarmark/mypleasings",
4-
revision = "69b993a9ab5a23cf1fc2ec89a1f41595daa0bf47",
4+
revision = "f8a12721c6f929db3e227e07c152d428ac47ab1b",
55
)
66

77
sh_cmd(

0 commit comments

Comments
 (0)