-
Notifications
You must be signed in to change notification settings - Fork 6
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: Augustin Husson <[email protected]>
- Loading branch information
Showing
3 changed files
with
107 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
- snapshot/* | ||
tags: | ||
- v* | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.ref_name != 'main' }} | ||
|
||
jobs: | ||
build: | ||
name: "go and github release" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
env: | ||
# This env is required for the docker manifest command to work | ||
DOCKER_CLI_EXPERIMENTAL: "enabled" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: perses/[email protected] | ||
- uses: ./.github/perses-ci/actions/setup_environment | ||
with: | ||
enable_go: true | ||
- name: Build operator | ||
run: make build |
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: go | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
- snapshot/* | ||
tags: | ||
- v* | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.ref_name != 'main' }} | ||
|
||
jobs: | ||
gofmt: | ||
name: "check code format" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- uses: perses/[email protected] | ||
- uses: ./.github/perses-ci/actions/setup_environment | ||
with: | ||
enable_go: true | ||
- name: check format | ||
run: make checkformat | ||
- name: check go.mod | ||
run: make checkunused | ||
test: | ||
name: "tests" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- uses: perses/[email protected] | ||
- uses: ./.github/perses-ci/actions/setup_environment | ||
with: | ||
enable_go: true | ||
- name: test | ||
run: make test | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- uses: perses/[email protected] | ||
- uses: ./.github/perses-ci/actions/setup_environment | ||
with: | ||
enable_go: true | ||
- name: generate files | ||
run: make generate | ||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.54.2 | ||
args: --timeout 5m |
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