-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
- Loading branch information
1 parent
4a7d7df
commit 0bdba5a
Showing
1 changed file
with
52 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,78 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- release-3.17 | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17 | ||
go-version: '1.19' | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download license information for dependencies | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: make license-cache | ||
- name: Test | ||
run: make test | ||
|
||
- name: Check licenses | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: make license-check | ||
- name: Check diff | ||
run: make check-diff | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
- name: Check Diff | ||
run: | | ||
make check-diff | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.19' | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Lint | ||
run: make lint | ||
env: | ||
LINTER_FLAGS: '--timeout 5m' | ||
run: | | ||
make lint | ||
|
||
- name: Run tests | ||
run: | | ||
make test | ||
license-check: | ||
name: License check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.19' | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache licenses | ||
uses: actions/cache@v3 | ||
with: | ||
key: licensei-v2-${{ hashFiles('go.sum') }} | ||
path: | | ||
.licensei.cache | ||
restore-keys: | | ||
licensei-v2 | ||
- name: Download license information for dependencies | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: make license-cache | ||
|
||
- name: Check licenses | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: make license-check |