Skip to content

Commit 0487686

Browse files
committed
Merge branch 'master' into hs/scep
2 parents 9447365 + 16c20c9 commit 0487686

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+10673
-11265
lines changed

.dockerignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
README.md
2-
.gitignore
31
bin
42
coverage.txt
53
*.test

.github/workflows/release.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
test:
1111
name: Lint, Test, Build
1212
runs-on: ubuntu-20.04
13+
strategy:
14+
matrix:
15+
go: [ '1.15', '1.16' ]
1316
outputs:
1417
is_prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
1518
steps:
@@ -20,15 +23,39 @@ jobs:
2023
name: Setup Go
2124
uses: actions/setup-go@v2
2225
with:
23-
go-version: '1.15.8'
26+
go-version: ${{ matrix.go }}
2427
-
2528
name: Install Deps
2629
id: install-deps
2730
run: sudo apt-get -y install libpcsclite-dev
2831
-
29-
name: Lint, Test, Build
32+
name: golangci-lint
33+
uses: golangci/golangci-lint-action@v2
34+
with:
35+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
36+
version: 'latest'
37+
38+
# Optional: working directory, useful for monorepos
39+
# working-directory: somedir
40+
41+
# Optional: golangci-lint command line arguments.
42+
args: --timeout=30m
43+
44+
# Optional: show only new issues if it's a pull request. The default value is `false`.
45+
# only-new-issues: true
46+
47+
# Optional: if set to true then the action will use pre-installed Go.
48+
# skip-go-installation: true
49+
50+
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
51+
# skip-pkg-cache: true
52+
53+
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
54+
# skip-build-cache: true
55+
-
56+
name: Test, Build
3057
id: lint_test_build
31-
run: V=1 make -j1 bootstrap ci
58+
run: V=1 make ci
3259

3360
create_release:
3461
name: Create Release
@@ -96,7 +123,7 @@ jobs:
96123
name: Set up Go
97124
uses: actions/setup-go@v2
98125
with:
99-
go-version: '1.15.8'
126+
go-version: '1.16'
100127
-
101128
name: APT Install
102129
id: aptInstall
@@ -126,7 +153,7 @@ jobs:
126153
- name: Setup Go
127154
uses: actions/setup-go@v2
128155
with:
129-
go-version: '1.15.8'
156+
go-version: '1.16'
130157
- name: Build
131158
id: build
132159
run: |

.github/workflows/test.yml

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,55 @@ on:
1111
jobs:
1212
lintTestBuild:
1313
name: Lint, Test, Build
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-20.04
15+
strategy:
16+
matrix:
17+
go: [ '1.15', '1.16' ]
1518
steps:
16-
- name: Checkout
19+
-
20+
name: Checkout
1721
uses: actions/checkout@v2
18-
- name: Setup Go
22+
-
23+
name: Setup Go
1924
uses: actions/setup-go@v2
2025
with:
21-
go-version: '1.15.6'
22-
- name: Install Deps
26+
go-version: ${{ matrix.go }}
27+
-
28+
name: Install Deps
2329
id: install-deps
2430
run: sudo apt-get -y install libpcsclite-dev
25-
- name: Lint, Test, Build
26-
id: lintTestBuild
27-
run: V=1 make -j1 bootstrap ci
28-
- name: Codecov
31+
-
32+
name: golangci-lint
33+
uses: golangci/golangci-lint-action@v2
34+
with:
35+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
36+
version: 'latest'
37+
38+
# Optional: working directory, useful for monorepos
39+
# working-directory: somedir
40+
41+
# Optional: golangci-lint command line arguments.
42+
args: --timeout=30m
43+
44+
# Optional: show only new issues if it's a pull request. The default value is `false`.
45+
# only-new-issues: true
46+
47+
# Optional: if set to true then the action will use pre-installed Go.
48+
# skip-go-installation: true
49+
50+
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
51+
# skip-pkg-cache: true
52+
53+
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
54+
# skip-build-cache: true
55+
-
56+
name: Test, Build
57+
id: lint_test_build
58+
run: V=1 make ci
59+
-
60+
name: Codecov
2961
uses: codecov/codecov-action@v1.2.1
3062
with:
31-
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
3263
file: ./coverage.out # optional
3364
name: codecov-umbrella # optional
3465
fail_ci_if_error: true # optional (default = false)

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OUTPUT_ROOT=output/
1818

1919
all: lint test build
2020

21-
ci: lintcgo testcgo build
21+
ci: testcgo build
2222

2323
.PHONY: all ci
2424

@@ -28,7 +28,7 @@ ci: lintcgo testcgo build
2828

2929
bootstra%:
3030
# Using a released version of golangci-lint to take into account custom replacements in their go.mod
31-
$Q GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.24.0
31+
$Q curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.39.0
3232

3333
.PHONY: bootstra%
3434

@@ -38,7 +38,7 @@ bootstra%:
3838

3939
# If TRAVIS_TAG is set then we know this ref has been tagged.
4040
ifdef TRAVIS_TAG
41-
VERSION := $(TRAVIS_TAG)
41+
VERSION ?= $(TRAVIS_TAG)
4242
NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc)
4343
ifeq ($(NOT_RC),)
4444
PUSHTYPE := release-candidate
@@ -47,7 +47,7 @@ PUSHTYPE := release
4747
endif
4848
# GITHUB Actions
4949
else ifdef GITHUB_REF
50-
VERSION := $(shell echo $(GITHUB_REF) | sed 's/^refs\/tags\///')
50+
VERSION ?= $(shell echo $(GITHUB_REF) | sed 's/^refs\/tags\///')
5151
NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc)
5252
ifeq ($(NOT_RC),)
5353
PUSHTYPE := release-candidate

0 commit comments

Comments
 (0)