build(deps): Bump golang.org/x/crypto from 0.11.0 to 0.16.0 #670
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/**" | |
- "**.go" | |
- "Makefile" | |
- "go.**" | |
pull_request: | |
paths: | |
- ".github/workflows/**" | |
- "**.go" | |
- "Makefile" | |
- "go.**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.18 | |
- uses: actions/checkout@v3 | |
- name: Cache Go modules | |
uses: actions/cache@preview | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.OS }}-build-${{ env.cache-name }}- | |
${{ runner.OS }}-build- | |
${{ runner.OS }}- | |
- run: go install github.com/golangci/golangci-lint/cmd/[email protected] | |
- run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Add license | |
run: | | |
make addlicense && git add client api pkg cmd && | |
git diff --cached --exit-code || (echo 'Please run "make addlicense" to verify license' && exit 1); | |
- run: go mod tidy | |
- name: Generate API documentation | |
run: | | |
make swag && git add pkg && | |
git diff --cached --exit-code || (echo 'Please run "make swag" to verify api doc' && exit 1); | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
# Ref https://github.com/golangci/golangci-lint-action/issues/244 | |
skip-pkg-cache: true | |
args: --timeout=3m | |
build: | |
name: build | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.18 | |
- name: Cache Go modules | |
uses: actions/cache@preview | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.OS }}-build-${{ env.cache-name }}- | |
${{ runner.OS }}-build- | |
${{ runner.OS }}- | |
- run: go mod tidy | |
- name: Generate API documentation | |
run: make swag | |
- name: Build | |
run: make | |
test: | |
name: test | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.18 | |
- name: Cache Go modules | |
uses: actions/cache@preview | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.OS }}-build-${{ env.cache-name }}- | |
${{ runner.OS }}-build- | |
${{ runner.OS }}- | |
- run: go mod tidy | |
- name: Generate API documentation | |
run: make swag | |
- name: test | |
run: make test |