-
Notifications
You must be signed in to change notification settings - Fork 50
75 lines (70 loc) · 2.1 KB
/
pull-integration-namespace-k3d.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: pull-integration-namespace-k3d
on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/pull-integration-namespace-k3d.yml"
- "resources/**"
- "tests/**"
- "nginx/**"
- "src/**"
- "tests/**"
jobs:
run-test:
runs-on: ubuntu-latest
steps:
- uses: gardenlinux/workflow-telemetry-action@v2
with:
comment_on_pr: false
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
with:
cluster-name: "k3dCluster"
args: >-
--agents 1
--port 80:80@loadbalancer
--port 443:443@loadbalancer
--wait
- uses: actions/setup-node@v4
with:
node-version: 20
- name: setup_busola
shell: bash
run: |
set -e
npm ci
npm run build
npm i -g serve
- name: run_tests
shell: bash
run: |
k3d kubeconfig get k3dCluster > tests/integration/fixtures/kubeconfig.yaml
export CYPRESS_DOMAIN=http://localhost:3000
serve -s build > busola.log &
pushd backend
npm start > backend.log &
popd
echo "waiting for server to be up..."
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' "$CYPRESS_DOMAIN")" != "200" ]]; do sleep 5; done
sleep 10
cd tests/integration
npm ci && npm run "test:namespace"
- name: Uploads artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: cypress-${{ github.job }}
path: tests/integration/cypress/
retention-days: 90
- name: Upload Busola logs
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: busola-logs-${{ github.job }}
path: |
backend/backend.log
busola.log
retention-days: 90