-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up CI config, move license-check in
Clean up CI config to match how we do it in other OF repos. Move license-check job from Prow to GH. Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
- Loading branch information
Showing
1 changed file
with
24 additions
and
53 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,81 +1,52 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
merge_group: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- main | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v3 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19.x | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache go module cache | ||
id: cache-go-mod | ||
uses: actions/cache@v2 | ||
go-version-file: "go.mod" | ||
- run: make test | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Get dependencies | ||
run: go mod download | ||
|
||
- name: Test | ||
run: make test | ||
|
||
- uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: cover.out | ||
files: cover.out | ||
functionalities: fixes | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v3 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19.x | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
go-version-file: "go.mod" | ||
- uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.49 | ||
args: --timeout 5m | ||
|
||
go-apidiff: | ||
name: go-apidiff | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.19 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
go-version-file: "go.mod" | ||
- name: Run go-apidiff | ||
uses: joelanford/go-apidiff@main | ||
|
||
license-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: make check-license |