Skip to content

Bump depends

Bump depends #1059

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- run: |
./hack/verify-all.sh
test:
runs-on: ubuntu-latest
needs:
- verify
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- run: |
go test ./pkg/...
build:
runs-on: ubuntu-latest
needs:
- verify
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- run: |
make build image
mv bin/*/*/ferryctl ./
docker save -o ferry-images.tar $(docker images | grep ghcr.io/ferryproxy/ferry/ | awk '{print $1 ":" $2}')
- name: Upload
uses: actions/upload-artifact@v2
with:
name: artifacts
path: |
ferryctl
ferry-images.tar
test-mcs:
continue-on-error: true
strategy:
matrix:
case:
- mcs
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v3
- name: Download
uses: actions/download-artifact@v2
with:
name: artifacts
- name: Setup
run: |
cp ferryctl /usr/local/bin/ferryctl && chmod +x /usr/local/bin/ferryctl
docker load -i ferry-images.tar
- name: Start cluster
run: |
ulimit -n 4096
./test/hack/start-environment.sh ${{ matrix.case }}
- name: Test control-plane and cluster-1
run: ./test/test/test-in-both-mcs.sh
env:
ROUTE_NAME: ferry-test
CONTROL_PLANE: control-plane
CLUSTER_1: cluster-1
CLUSTER_2: control-plane
TARGET_1: web-1
TARGET_2: web-0
test-2-cluster-cases:
continue-on-error: true
strategy:
matrix:
case:
- default
- control-plane-unreachable
- data-plane-unreachable
- quick-join
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v3
- name: Download
uses: actions/download-artifact@v2
with:
name: artifacts
- name: Setup
run: |
cp ferryctl /usr/local/bin/ferryctl && chmod +x /usr/local/bin/ferryctl
docker load -i ferry-images.tar
- name: Start cluster
run: |
ulimit -n 4096
./test/hack/start-environment.sh ${{ matrix.case }}
- name: Test control-plane and cluster-1
run: ./test/test/test-in-both.sh
env:
ROUTE_NAME: ferry-test
CONTROL_PLANE: control-plane
CLUSTER_1: cluster-1
CLUSTER_2: control-plane
TARGET_1: web-1
TARGET_2: web-0
- name: Test chaotic control-plane and cluster-1
run: ./test/test/test-in-both-chaotic.sh
env:
ROUTE_NAME: ferry-test
CONTROL_PLANE: control-plane
CLUSTER_1: cluster-1
CLUSTER_2: control-plane
TARGET_1: web-1
TARGET_2: web-0
test-3-cluster-cases:
continue-on-error: true
strategy:
matrix:
case:
- default-3-clusters
- control-plane-unreachable-3-clusters
- data-plane-unreachable-3-clusters
- quick-join-3-clusters
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v3
- name: Download
uses: actions/download-artifact@v2
with:
name: artifacts
- name: Setup
run: |
cp ferryctl /usr/local/bin/ferryctl && chmod +x /usr/local/bin/ferryctl
docker load -i ferry-images.tar
- name: Start cluster
run: |
ulimit -n 4096
./test/hack/start-environment.sh ${{ matrix.case }}
- name: Test cluster-1 and cluster-2
run: ./test/test/test-in-both.sh
env:
ROUTE_NAME: ferry-test
CONTROL_PLANE: control-plane
CLUSTER_1: cluster-1
CLUSTER_2: cluster-2
TARGET_1: web-1
TARGET_2: web-2
- name: Test control-plane and cluster-1
run: ./test/test/test-in-both.sh
env:
ROUTE_NAME: ferry-test
CONTROL_PLANE: control-plane
CLUSTER_1: cluster-1
CLUSTER_2: control-plane
TARGET_1: web-1
TARGET_2: web-0
- name: Test control-plane and cluster-1 and cluster-2
run: ./test/test/test-load-balance.sh
env:
ROUTE_NAME: ferry-test
CONTROL_PLANE: control-plane
CLUSTER_1: control-plane
CLUSTER_2: cluster-1
CLUSTER_3: cluster-2
TARGET_1: web-0
TARGET_2: web-1
TARGET_3: web-2
- name: Test cluster-1 and cluster-2 and control-plane
run: ./test/test/test-load-balance.sh
env:
ROUTE_NAME: ferry-test
CONTROL_PLANE: control-plane
CLUSTER_1: cluster-1
CLUSTER_2: cluster-2
CLUSTER_3: control-plane
TARGET_1: web-1
TARGET_2: web-2
TARGET_3: web-0
test-not-controller-cases:
continue-on-error: true
strategy:
matrix:
case:
- forward
- manual
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v2
- name: Download
uses: actions/download-artifact@v2
with:
name: artifacts
- name: Setup
run: |
cp ferryctl /usr/local/bin/ferryctl && chmod +x /usr/local/bin/ferryctl
docker load -i ferry-images.tar
- name: Start cluster
run: |
ulimit -n 4096
./test/hack/start-environment.sh ${{ matrix.case }}
- name: Test ${{ matrix.case }}
run: ./test/test/test-${{ matrix.case }}.sh