Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up CI config, move license-check in #119

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 27 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,55 @@
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
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- uses: joelanford/go-apidiff@main

- name: Run go-apidiff
uses: joelanford/go-apidiff@main
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make check-license
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @operator-framework/operator-lib-maintainers
Loading