Refactor/Refactor controller logic #36
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 | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: { } | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CI_RUST_TOOLCHAIN: 1.70.0 | |
KIND_VERSION: v0.20.0 | |
jobs: | |
validation: | |
name: 'Validation' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
k8s: [ v1.25.3, v1.26.0, v1.27.3 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 'Install Kind' | |
run: | | |
wget https://github.com/kubernetes-sigs/kind/releases/download/${{ env.KIND_VERSION }}/kind-linux-amd64 | |
chmod +x kind-linux-amd64 | |
mv kind-linux-amd64 /usr/local/bin/kind | |
- name: 'Install Toolchain' | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ env.CI_RUST_TOOLCHAIN }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: 'Build Image' | |
run: | | |
cargo build --release | |
cd build | |
cp ../target/release/xline-operator . | |
docker build . -t datenlord/xline-operator:latest -f operator.Dockerfile | |
- name: 'E2E CI' | |
env: | |
KIND_CLUSTER_IMAGE: kindest/node:${{ matrix.k8s }} | |
run: bash ./tests/e2e/e2e.sh -p ci | |
- name: clean | |
if: failure() | |
run: bash ./tests/e2e/e2e.sh -c | |
- name: upload kind logs | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: xline_kind_log_${{ matrix.k8s }} | |
path: /tmp/xlineoperator/e2e-kind |