Support running e2e tests on AWS #96
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 Tests | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
run-e2e-tests: | |
name: Run E2E Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ~1.22.0 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
audience: sts.amazonaws.com | |
aws-region: us-east-2 | |
role-to-assume: arn:aws:iam::018302341396:role/GithubOIDC | |
role-duration-seconds: 3600 | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
detached: true | |
- name: Install requirements | |
run: | | |
sudo apt install make wget | |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64 | |
chmod +x ./kind | |
sudo mv ./kind /usr/local/bin/kind | |
- name: Increase inotify watches | |
run: | | |
# Prevents https://cluster-api.sigs.k8s.io/user/troubleshooting#cluster-api-with-docker----too-many-open-files | |
sudo sysctl fs.inotify.max_user_watches=1048576 | |
sudo sysctl fs.inotify.max_user_instances=8192 | |
- name: Build images | |
run: | | |
cd hack | |
./build-e2e-images.sh | |
cd .. | |
make docker-build-e2e | |
- name: Run e2e tests | |
run: | | |
E2E_INFRA=aws GINKGO_FOCUS="Workload cluster creation" make test-e2e | |
env: | |
GOPROXY: direct |