Skip to content

Update GitHub actions and Go to 1.19 #88

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

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
183 changes: 90 additions & 93 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,96 @@
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
name: ci/github

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

permissions:
contents: read

jobs:
unit:
strategy:
matrix:
go-version: [1.18.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@v2
- name: Build
run: make build
- name: Test
run: make test
verify:
strategy:
matrix:
go-version: [1.18.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Verify fmt
run: make verify-fmt
- name: Verify generated code
run: make verify-generate
- name: Verify generated manifests
run: make verify-manifests
- name: Verify OLM bundle
run: make verify-bundle
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
with:
args: --timeout=10m
e2e:
strategy:
fail-fast: false
matrix:
go-version: [1.18.x]
os: [ubuntu-latest]
kubernetes:
- v1.20.7
max-parallel: 2
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@v2
- name: Install kubectl
uses: azure/setup-kubectl@v1
with:
version: ${{ matrix.kubernetes }}
- name: Deploy KinD Local Container Registry
run: make deploy-kind-registry
- name: Create KinD cluster
uses: helm/[email protected]
with:
version: v0.11.1
node_image: kindest/node:${{ matrix.kubernetes }}
cluster_name: kind
config: test/kind/config.yaml
wait: 120s
- name: Verify KinD cluster
run: make verify-kind
- name: Install KinD post-actions
run: make deploy-kind-registry-post
- name: Install OLM
run: make install-olm
# Builds the operator and makes the image readable in the KinD cluster
- name: Build Operator Bundle
run: |
make bundle-push IMAGE_REPO=localhost:5000
- name: Build Catalog Source
run: |
make catalog-push IMAGE_REPO=localhost:5000 OPM_USE_HTTP=true
- name: Run Operator with Catalog
run: make catalog-run IMAGE_REPO=localhost:5000
unit:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
cache: true
check-latest: true
- name: Build
run: make build
- name: Test
run: make test
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
cache: true
check-latest: true
- name: Verify fmt
run: make verify-fmt
- name: Verify generated code
run: make verify-generate
- name: Verify generated manifests
run: make verify-manifests
- name: Verify OLM bundle
run: make verify-bundle
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
with:
args: --timeout=10m
e2e:
strategy:
fail-fast: false
matrix:
kubernetes:
- v1.23.13
max-parallel: 2
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
cache: true
check-latest: true
- name: Install kubectl
uses: azure/setup-kubectl@v1
with:
version: ${{ matrix.kubernetes }}
- name: Deploy KinD Local Container Registry
run: make deploy-kind-registry
- name: Create KinD cluster
uses: helm/kind-action@v1
with:
version: v0.17.0
node_image: kindest/node:${{ matrix.kubernetes }}
cluster_name: kind
config: test/kind/config.yaml
wait: 120s
- name: Verify KinD cluster
run: make verify-kind
- name: Install KinD post-actions
run: make deploy-kind-registry-post
- name: Install OLM
run: make install-olm
# Builds the operator and makes the image readable in the KinD cluster
- name: Build Operator Bundle
run: |
make bundle-push IMAGE_REPO=localhost:5000
- name: Build Catalog Source
run: |
make catalog-push IMAGE_REPO=localhost:5000 OPM_USE_HTTP=true
- name: Run Operator with Catalog
run: make catalog-run IMAGE_REPO=localhost:5000
11 changes: 7 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ jobs:
IMAGE_NAMESPACE: ${{ github.repository }}
VERSION: ${{ github.event.inputs.release }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history, needed for release note generation.
# Install tools
- uses: actions/setup-go@v2
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x
- uses: sigstore/[email protected]
go-version: 1.19.x
cache: true
check-latest: true
- uses: sigstore/cosign-installer@v2
- name: Build Release Images
env:
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
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/shipwright-io/operator

go 1.18
go 1.19

require (
github.com/go-logr/logr v1.2.3
Expand Down