Chore: replace deprecated command with environment file #425
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Test | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
- release-* | |
pull_request: | |
branches: | |
- main | |
- release-* | |
workflow_dispatch: { } | |
jobs: | |
build-artifact: | |
env: | |
VELAUX_VERSION_KEY: github.com/oam-dev/velad/version.VelaUXVersion | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
TARGETS: [ linux/amd64, darwin/amd64, windows/amd64, linux/arm64, darwin/arm64 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20.5" | |
- name: Get matrix | |
id: get_matrix | |
shell: bash | |
run: | | |
TARGETS=${{matrix.TARGETS}} | |
echo "OS=${TARGETS%/*}" >> $GITHUB_OUTPUT | |
echo "ARCH=${TARGETS#*/}" >> $GITHUB_OUTPUT | |
- name: Build | |
run: | | |
make ${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: bin/velad-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }} | |
name: velad-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }} | |
test-linux: | |
runs-on: ubuntu-22.04 | |
needs: [ build-artifact ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20.5" | |
- name: Install ginkgo | |
run: go install github.com/onsi/ginkgo/[email protected] | |
- uses: actions/download-artifact@v3 | |
with: | |
name: velad-linux-amd64 | |
- run: | | |
chmod u+x velad-linux-amd64 && mv velad-linux-amd64 velad | |
sudo ./velad install --set image.pullPolicy=Never --set admissionWebhooks.patch.image.pullPolicy=Never --set multicluster.clusterGateway.image.pullPolicy=Never | |
sudo chmod a+r $(./velad kubeconfig --host) | |
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core --timeout=180s -n vela-system --kubeconfig=$(./velad kubeconfig --host) | |
sudo vela addon enable /root/.vela/addons/velaux | |
- name: Run e2e test | |
run: ginkgo -v ./test/e2e-test | |
test-darwin: | |
runs-on: macos-12 | |
needs: [ build-artifact ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20.5" | |
- name: Install ginkgo | |
run: go install github.com/onsi/ginkgo/[email protected] | |
- uses: actions/download-artifact@v3 | |
with: | |
name: velad-darwin-amd64 | |
- name: Setup Docker | |
uses: docker-practice/actions-setup-docker@master | |
with: | |
docker_version: "24.0.2" | |
- run: | | |
chmod u+x velad-darwin-amd64 && mv velad-darwin-amd64 velad | |
./velad install --set image.pullPolicy=Never --set admissionWebhooks.patch.image.pullPolicy=Never --set multicluster.clusterGateway.image.pullPolicy=Never | |
export KUBECONFIG=$(./velad kubeconfig --host) | |
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core --timeout=180s -n vela-system | |
vela addon enable ~/.vela/addons/velaux | |
# TODO(qiaozp): fix the issue of e2e test on darwin | |
# - name: Run e2e test | |
# run: ginkgo -v ./test/e2e-test | |
# test-linux-arm64: | |
# runs-on: ubuntu-22.04 | |
# needs: [ build-artifact ] | |
# steps: | |
# - uses: actions/download-artifact@v3 | |
# with: | |
# name: velad-darwin-amd64 | |
# - run: chmod u+x velad-linux-amd64 && mv velad-linux-amd64 velad | |
# - name: pguyot/arm-runner-action@v2 | |
# with: | |
# commands: | | |
# sudo ./velad install --set image.pullPolicy=Never --set admissionWebhooks.patch.image.pullPolicy=Never --set multicluster.clusterGateway.image.pullPolicy=Never | |
# sudo vela def list | |
# test-windows: | |
# runs-on: windows-2022 | |
# needs: [ build-artifact ] | |
# steps: | |
# - uses: actions/download-artifact@v3 | |
# with: | |
# name: velad-windows-amd64 | |
# - name: Setup Docker | |
# uses: docker-practice/actions-setup-docker@master | |
# - run: chmod u+x velad-windows-amd64 && mv velad-windows-amd64 velad.exe | |
# - run: .\velad install --set image.pullPolicy=Never --set admissionWebhooks.patch.image.pullPolicy=Never --set multicluster.clusterGateway.image.pullPolicy=Never | |