Skip to content

TEST E2E

TEST E2E #18

Workflow file for this run

name: Pre-commit checks
on:
pull_request:
branches:
- master
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: .go_version
# - name: Check license
# run: make license-check
# - name: Go lint
# run: make lint
# - name: Run Version Check
# run: make pseudo
# - name: Run ShellCheck
# run: make check_scripts
# - name: Unit tests
# run: make test
- name: Code coverage
uses: codecov/codecov-action@v3
with:
files: build/coverage.txt
e2e-tests:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
k8s: [v1.28.0, v1.27.3]
plugin: ['', '--plugin']
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: .go_version
- name: Set hugepage
run: |
echo "vm.nr_hugepages = 1024" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
sudo sysctl -a | grep vm.nr_hugepages
- name: Cache and Restore e2e required tools
id: cache
uses: actions/cache@v3
with:
path: |
tools
key: ${{ runner.os }}-e2e-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-e2e-
- name: Create artifacts stage folder
run: mkdir -p /tmp/artifacts
- run: ./scripts/run-e2e-tests.sh -a "test" -n "yk8s" -v "kindest/node:${KIND_NODE_IMAGE}" ${KIND_EXTRA_ARGS}
env:
KIND_NODE_IMAGE: ${{ matrix.k8s }}
KIND_EXTRA_ARGS: ${{ matrix.plugin }}
- run: echo hello > /tmp/artifacts/world.txt
if: ${{ failure() }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: ${{ github.job }} stdout (${{ matrix.k8s }}${{ matrix.plugin == '' && '' || format(', {0}', matrix.plugin) }})
path: /tmp/artifacts