Skip to content

Commit

Permalink
test: update tests to support latest 2 versions of go
Browse files Browse the repository at this point in the history
Signed-off-by: Dustin Scott <dustin.scott18@gmail.com>
  • Loading branch information
scottd018 committed Jun 20, 2022
1 parent c00b9b3 commit 811d008
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.18

# TODO: readdress this task as it prevented a successful release
# See action https://github.com/vmware-tanzu-labs/operator-builder/runs/4861431396?check_suite_focus=true
Expand Down
28 changes: 24 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
unit-test:
name: Unit Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- go-version: 1.17
- go-version: 1.18
steps:
- name: Checkout Code
uses: actions/checkout@v2
Expand All @@ -20,7 +26,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: ${{ matrix.go-version }}

- name: Run Test
uses: ./.github/common-actions/unit-test
Expand All @@ -32,6 +38,12 @@ jobs:
name: Build
runs-on: ubuntu-latest
needs: unit-test
strategy:
fail-fast: false
matrix:
include:
- go-version: 1.17
- go-version: 1.18
steps:
- name: Checkout Code
uses: actions/checkout@v2
Expand All @@ -41,7 +53,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: ${{ matrix.version }}

- name: Build Binary Artifact (operator-builder)
run: make build
Expand All @@ -66,15 +78,19 @@ jobs:
- name: Standalone Operator
artifact: standalone-codebase
test-workload-path: test/cases/standalone
go-version: 1.17
- name: Standalone Edge Cases Operator
artifact: standalone-edge-codebase
test-workload-path: test/cases/edge-standalone
go-version: 1.18
- name: Workload Collection Operator
artifact: collection-codebase
test-workload-path: test/cases/collection
go-version: 1.18
- name: Workload Collection Edge Cases Operator
artifact: collection-edge-codebase
test-workload-path: test/cases/edge-collection
go-version: 1.17
env:
TEST_WORKLOAD_PATH: "${{ matrix.test-workload-path }}"
TEST_PATH: "/tmp/operator-builder-func-test"
Expand All @@ -93,7 +109,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: ${{ matrix.go-version }}

- name: Initialize ${{ matrix.name }} Codebase
run: |
Expand Down Expand Up @@ -129,18 +145,22 @@ jobs:
artifact: standalone-codebase
test-build: "true"
test-deploy: "true"
go-version: 1.17
- name: Standalone Edge Cases Operator
artifact: standalone-edge-codebase
test-build: "false"
test-deploy: "false"
go-version: 1.18
- name: Workload Collection Operator
artifact: collection-codebase
test-build: "true"
test-deploy: "false"
go-version: 1.18
- name: Workload Collection Edge Cases Operator
artifact: collection-edge-codebase
test-build: "true"
test-deploy: "false"
go-version: 1.17
services:
registry:
image: registry:2
Expand All @@ -158,7 +178,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: ${{ matrix.go-version }}

- name: Download ${{ matrix.name }} Codebase
uses: actions/download-artifact@v2
Expand Down

0 comments on commit 811d008

Please sign in to comment.