Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
Draft
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
77 changes: 38 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,63 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]
paths-ignore:
- 'config/helm/**'
- "config/helm/**"
pull_request:
branches: [ main ]
branches: [main]
paths-ignore:
- 'config/helm/**'
- "config/helm/**"

jobs:

sanity-checks:
name: Sanity checks
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go

- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi

- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.29

test:
name: Tests
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go

- name: Generate manifests
run: make generate
- name: Generate manifests
run: make generate

- name: Test
env:
LOCALSTACK_ENDPOINT: ${{ job.services.localstack.ports[4566] }}
shell: bash
run: |
export ENVTEST_ASSETS_DIR=${GITHUB_WORKSPACE}/testbin
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh
fetch_envtest_tools ${ENVTEST_ASSETS_DIR}
setup_envtest_env ${ENVTEST_ASSETS_DIR}
go test -v ./... -coverprofile cover.out
- name: Test
env:
LOCALSTACK_ENDPOINT: ${{ job.services.localstack.ports[4566] }}
shell: bash
run: |
export ENVTEST_ASSETS_DIR=${GITHUB_WORKSPACE}/testbin
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh
fetch_envtest_tools ${ENVTEST_ASSETS_DIR}
setup_envtest_env ${ENVTEST_ASSETS_DIR}
go test -v ./... -coverprofile cover.out

services:
localstack:
image: localstack/localstack:0.12.4
env:
SERVICES: 'iam,s3,sts'
env:
SERVICES: "iam,s3,sts"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.15 as builder
FROM golang:1.16 as builder

WORKDIR /workspace
COPY go.mod go.mod
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/VoodooTeam/irsa-operator

go 1.15
go 1.16

require (
cloud.google.com/go v0.79.0 // indirect
Expand Down