Skip to content

chore(ci): run the smoke tests on GKE #45

chore(ci): run the smoke tests on GKE

chore(ci): run the smoke tests on GKE #45

Workflow file for this run

name: Build
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
pull_request: {}
push:
branches:
- main
env:
SMOKE_PRODUCT_NAME: "kuma"
SMOKE_PRODUCT_VERSION: "2.9.2"
CI_TOOLS_DIR: "/home/runner/work/kuma-smoke/.ci_tools"
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: make dev/tools
run: make dev/tools
- name: make check
run: make check
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=10m --verbose
skip-cache: true
build-test:
name: Build and test
timeout-minutes: 40
needs:
- check
runs-on: ubuntu-latest
strategy:
matrix:
envPlatform: ${{ fromJSON( (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) && '["kind", "gke"]' || '["kind"]' ) }}
fail-fast: false
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci/skip-test') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: make dev/tools
run: |
make dev/tools
echo "${CI_TOOLS_DIR}/bin" >> $GITHUB_PATH
- name: make build
run: make build
- name: export gke values
if: ${{ matrix.envPlatform == 'gke' && secrets.GOOGLE_PROJECT != '' }}

Check failure on line 60 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yaml (Line: 60, Col: 13): Unrecognized named-value: 'secrets'. Located at position 32 within expression: matrix.envPlatform == 'gke' && secrets.GOOGLE_PROJECT != '' .github/workflows/build.yaml (Line: 68, Col: 13): Unrecognized named-value: 'secrets'. Located at position 32 within expression: matrix.envPlatform != 'gke' || secrets.GOOGLE_PROJECT != ''
run: |
echo 'GOOGLE_PROJECT="${{ secrets.GOOGLE_PROJECT }}" >> $GITHUB_ENV
echo GOOGLE_LOCATION="${{ secrets.GOOGLE_LOCATION }}" >> $GITHUB_ENV
echo "GOOGLE_APPLICATION_CREDENTIALS<<EOF" >> $GITHUB_ENV
echo '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}' >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: make run
if: ${{ matrix.envPlatform != 'gke' || secrets.GOOGLE_PROJECT != '' }}
run: |
SMOKE_ENV_TYPE=${{ matrix.envPlatform }} make run
- name: make cleanup
if: always()
run: make cleanup
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: always()
with:
name: smoke-report-${{ matrix.envPlatform }}
if-no-files-found: ignore
path: |
raw-report.json
build/debug-output/*.log
retention-days: ${{ github.event_name == 'pull_request' && 7 || 15 }}