|
| 1 | +# Copyright 2021, 2024 Oracle Corporation and/or its affiliates. |
| 2 | +# Licensed under the Universal Permissive License v 1.0 as shown at |
| 3 | +# https://oss.oracle.com/licenses/upl. |
| 4 | + |
| 5 | +# --------------------------------------------------------------------------- |
| 6 | +# Coherence Go Client GitHub Actions CI build Against v14.1.2 |
| 7 | +# --------------------------------------------------------------------------- |
| 8 | +name: CI Compatability v14.1.2 |
| 9 | + |
| 10 | +on: |
| 11 | + workflow_dispatch: |
| 12 | + push: |
| 13 | + branches: |
| 14 | + - '*' |
| 15 | + schedule: |
| 16 | + # Every day at midnight |
| 17 | + - cron: '0 0 * * *' |
| 18 | + |
| 19 | +jobs: |
| 20 | + build: |
| 21 | + runs-on: ubuntu-22.04 |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + coherenceVersion: |
| 26 | + - 14.1.2-0-0 |
| 27 | + - 14.1.2-0-1-SNAPSHOT |
| 28 | + go-version: |
| 29 | + - 1.19.x |
| 30 | + - 1.20.x |
| 31 | + - 1.21.x |
| 32 | + - 1.22.x |
| 33 | + - 1.23.x |
| 34 | + |
| 35 | +# Checkout the source, we need a depth of zero to fetch all of the history otherwise |
| 36 | +# the copyright check cannot work out the date of the files from Git. |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + with: |
| 40 | + fetch-depth: 0 |
| 41 | + |
| 42 | + - name: Get Docker Images |
| 43 | + shell: bash |
| 44 | + run: | |
| 45 | + docker pull gcr.io/distroless/java17 |
| 46 | +
|
| 47 | + - name: Set up JDK 17 for Build |
| 48 | + uses: actions/setup-java@v4 |
| 49 | + with: |
| 50 | + java-version: '17' |
| 51 | + distribution: 'zulu' |
| 52 | + |
| 53 | + - name: Cache Go Modules |
| 54 | + uses: actions/cache@v4 |
| 55 | + with: |
| 56 | + path: ~/go/pkg/mod |
| 57 | + key: ${{ runner.os }}-go-mods-${{ hashFiles('**/go.sum') }} |
| 58 | + restore-keys: | |
| 59 | + ${{ runner.os }}-go-mods- |
| 60 | +
|
| 61 | + - name: Cache Maven packages |
| 62 | + uses: actions/cache@v4 |
| 63 | + with: |
| 64 | + path: ~/.m2 |
| 65 | + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} |
| 66 | + restore-keys: ${{ runner.os }}-m2 |
| 67 | + |
| 68 | + - name: Set up Go |
| 69 | + uses: actions/setup-go@v5 |
| 70 | + with: |
| 71 | + go-version: '${{ matrix.go-version }}' |
| 72 | + |
| 73 | + - name: E2E Local Tests |
| 74 | + env: |
| 75 | + COH_VERSION: ${{ matrix.coherenceVersion }} |
| 76 | + shell: bash |
| 77 | + run: | |
| 78 | + echo "Running verify against $COH_VERSION" |
| 79 | + go get google.golang.org/grpc/cmd/[email protected] |
| 80 | + COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 INCLUDE_LONG_RUNNING=true COHERENCE_VERSION=$COH_VERSION PROFILES=,-jakarta,javax make clean generate-proto generate-proto-v1 build-test-images test-e2e-standalone |
| 81 | +
|
| 82 | + - name: E2E Local Tests With Scope |
| 83 | + env: |
| 84 | + COH_VERSION: ${{ matrix.coherenceVersion }} |
| 85 | + shell: bash |
| 86 | + run: | |
| 87 | + go get google.golang.org/grpc/cmd/[email protected] |
| 88 | + COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=$COH_VERSION PROFILES=,-jakarta,javax,scope make clean generate-proto generate-proto-v1 build-test-images test-e2e-standalone-scope |
| 89 | +
|
| 90 | + - uses: actions/upload-artifact@v4 |
| 91 | + if: failure() |
| 92 | + with: |
| 93 | + name: test-output-${{ matrix.go-version }}-${{ matrix.coherenceVersion }} |
| 94 | + path: build/_output/test-logs |
| 95 | + |
| 96 | + - uses: actions/upload-artifact@v4 |
| 97 | + if: failure() |
| 98 | + with: |
| 99 | + name: test-output-${{ matrix.go-version }}-${{ matrix.coherenceVersion }} |
| 100 | + path: build/_output/test-logs |
| 101 | + |
| 102 | + - name: E2E Local Tests SSL |
| 103 | + env: |
| 104 | + COH_VERSION: ${{ matrix.coherenceVersion }} |
| 105 | + shell: bash |
| 106 | + run: | |
| 107 | + echo "Running verify against $COH_VERSION" |
| 108 | + go get google.golang.org/grpc/cmd/[email protected] |
| 109 | + COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 SECURE=true COHERENCE_IGNORE_INVALID_CERTS=true INCLUDE_LONG_RUNNING=true \ |
| 110 | + COHERENCE_TLS_CERTS_PATH=`pwd`/test/utils/certs/guardians-ca.crt \ |
| 111 | + COHERENCE_TLS_CLIENT_CERT=`pwd`/test/utils/certs/star-lord.crt \ |
| 112 | + COHERENCE_TLS_CLIENT_KEY=`pwd`/test/utils/certs/star-lord.key \ |
| 113 | + COHERENCE_VERSION=$COH_VERSION PROFILES=,secure,-jakarta,javax make clean certs generate-proto generate-proto-v1 build-test-images test-e2e-standalone |
| 114 | +
|
| 115 | + - uses: actions/upload-artifact@v4 |
| 116 | + if: failure() |
| 117 | + with: |
| 118 | + name: test-output-${{ matrix.go-version }}-${{ matrix.coherenceVersion }} |
| 119 | + path: build/_output/test-logs |
0 commit comments