Skip to content

fix: fix go version when building the images (#160) #27

fix: fix go version when building the images (#160)

fix: fix go version when building the images (#160) #27

Workflow file for this run

name: E2E Tests
on:
push:
branches:
- main
create:
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
workflow_dispatch: {}
permissions:
id-token: write
contents: read
env:
GO_VERSION: '1.20'
jobs:
detect-noop:
runs-on: ubuntu-latest
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false
e2e-tests:
strategy:
# disable fail-fast to continue the in-progress pipeline when one failed job is detected to
# get test results for all scenarios.
fail-fast: false
matrix:
network-setting: [shared-vnet, peered-vnet, dynamic-ip-allocation]
runs-on: ubuntu-latest
needs: [
detect-noop,
]
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Prepare e2e variables
run: |
echo "AZURE_RESOURCE_GROUP="fleet-networking-e2e-$RANDOM"" >> $GITHUB_ENV
# reference: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure
- name: 'OIDC Login to Azure Public Cloud'
uses: azure/login@v1
with:
client-id: ${{ secrets.E2E_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.E2E_AZURE_SUBSCRIPTION_ID }}
- name: Setup e2e Environment
run: |
make e2e-setup
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.E2E_AZURE_SUBSCRIPTION_ID }}
AZURE_NETWORK_SETTING: ${{ matrix.network-setting }}
AZURE_RESOURCE_GROUP: ${{ env.AZURE_RESOURCE_GROUP }}
- name: Run e2e tests
run: |
make e2e-tests
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.E2E_AZURE_SUBSCRIPTION_ID }}
AZURE_NETWORK_SETTING: ${{ matrix.network-setting }}
AZURE_RESOURCE_GROUP: ${{ env.AZURE_RESOURCE_GROUP }}
- name: Cleanup e2e
if: always()
run: |
make e2e-cleanup
env:
AZURE_CLIENT_ID: ${{ secrets.E2E_AZURE_CLIENT_ID}}
AZURE_CLIENT_SECRET: ${{ secrets.E2E_AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_RESOURCE_GROUP: ${{ env.AZURE_RESOURCE_GROUP }}