Skip to content

Commit

Permalink
chore(ci): run e2e on public workers
Browse files Browse the repository at this point in the history
  • Loading branch information
samcday committed Mar 9, 2023
1 parent c5160f8 commit 4723671
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions .github/workflows/test_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run e2e tests
on: [ pull_request ]
jobs:
k8s:
runs-on: self-hosted
runs-on: ubuntu-latest
strategy:
matrix:
k8s: [ 1.24.10, 1.25.6, 1.26.1 ]
Expand All @@ -13,16 +13,31 @@ jobs:
with:
go-version: '1.19'
- uses: actions/checkout@master
- name: HCLOUD_TOKEN
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
TTS_TOKEN: ${{ secrets.TTS_TOKEN }}
run: |
set -ueo pipefail
if [[ "${HCLOUD_TOKEN:-}" != "" ]]; then
echo "HCLOUD_TOKEN=$HCLOUD_TOKEN" >> "$GITHUB_ENV"
elif [[ "${TTS_TOKEN:-}" != "" ]]; then
token="$(./scripts/get-token.sh)"
echo "::add-mask::$token"
echo "HCLOUD_TOKEN=$token" >> "$GITHUB_ENV"
else
echo "::error ::Couldn't determine HCLOUD_TOKEN. Check that repository secrets are setup correctly."
exit 1
fi
- name: Run tests
env:
K8S_VERSION: k8s-${{ matrix.k8s }}
USE_NETWORKS: yes
run: |
export HCLOUD_TOKEN=$(./scripts/get-token.sh)
go test $(go list ./... | grep e2etests) -v -timeout 60m
./scripts/delete-token.sh $HCLOUD_TOKEN
k3s:
runs-on: self-hosted
runs-on: ubuntu-latest
strategy:
matrix:
k3s: [ v1.24.10+k3s1, v1.25.6+k3s1, v1.26.1+k3s1 ]
Expand All @@ -33,12 +48,26 @@ jobs:
with:
go-version: '1.19'
- uses: actions/checkout@master
- name: HCLOUD_TOKEN
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
TTS_TOKEN: ${{ secrets.TTS_TOKEN }}
run: |
set -ueo pipefail
if [[ "${HCLOUD_TOKEN:-}" != "" ]]; then
echo "HCLOUD_TOKEN=$HCLOUD_TOKEN" >> "$GITHUB_ENV"
elif [[ "${TTS_TOKEN:-}" != "" ]]; then
token="$(./scripts/get-token.sh)"
echo "::add-mask::$token"
echo "HCLOUD_TOKEN=$token" >> "$GITHUB_ENV"
else
echo "::error ::Couldn't determine HCLOUD_TOKEN. Check that repository secrets are setup correctly."
exit 1
fi
- name: Run tests
env:
K8S_VERSION: k3s-${{ matrix.k3s }}
USE_NETWORKS: yes
run: |
export HCLOUD_TOKEN=$(./scripts/get-token.sh)
cat resp.json
go test $(go list ./... | grep e2etests) -v -timeout 60m
./scripts/delete-token.sh $HCLOUD_TOKEN

0 comments on commit 4723671

Please sign in to comment.