Skip to content

Commit 3356c7c

Browse files
committed
chore: get playwright working again
1 parent 25dece3 commit 3356c7c

File tree

15 files changed

+109
-107
lines changed

15 files changed

+109
-107
lines changed

.github/workflows/nightly.yaml

Lines changed: 106 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Playwright Tests
22

33
on:
44
push:
5-
branches: "disabled"
5+
branches: "**"
6+
pull_request:
7+
branches: "**"
68
# schedule:
79
# - cron: "30 22 * * *"
810
workflow_dispatch:
@@ -33,7 +35,7 @@ jobs:
3335
contents: read
3436

3537
steps:
36-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3739
- name : Set URL environment Variable
3840
run: |
3941
echo "URL=http://localhost:8000" >> $GITHUB_ENV
@@ -94,114 +96,114 @@ jobs:
9496
9597
- name: Setup management cluster
9698
run: |
97-
./utils/scripts/mgmt-cluster-setup.sh ${{ env.MANAGEMENT_CLUSTER_TYPE }} $(pwd) ${{ env.CLUSTER_NAME }}
99+
./playwright/utils/scripts/mgmt-cluster-setup.sh ${{ env.MANAGEMENT_CLUSTER_TYPE }} $(pwd) ${{ env.CLUSTER_NAME }}
98100
99101
- name: Extract branch name
100102
run: |
101103
echo "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
102104
id: extract_branch
103105

104-
- name: Setup wego enterprise
105-
run: |
106-
kubectl create namespace flux-system
107-
flux install
108-
kubectl create secret generic git-provider-credentials -n flux-system --from-literal=username="weave-gitops-bot" --from-literal=password="${WEAVEWORKS_BOT_TOKEN}"
109-
sed -i 's/BRANCH_NAME/${{ steps.extract_branch.outputs.branch_name }}/' ./utils/scripts/resources/flux-system-gitrepo.yaml
110-
./utils/scripts/wego-enterprise.sh setup ./utils/scripts
111-
112-
- name: Install violating-app
113-
run: |
114-
kubectl apply -f ./utils/data/violating-podinfo-kustomization.yaml
115-
116-
- name: Install policies
117-
run: |
118-
kubectl apply -f ./utils/data/policies.yaml
119-
120-
- name: Flux reconcile violating app
121-
run: |
122-
flux reconcile kustomization violating-podinfo -n default --with-source || true
123-
kubectl get pods -A
124-
125-
- name: Install gitopsset-configmaps
126-
run: |
127-
kubectl apply -f ./utils/data/gitops-sets-kustomization.yaml
128-
129-
- name: run tests
130-
if: success()
131-
run: |
132-
pytest -s -v --video=retain-on-failure --screenshot=only-on-failure --template=html1/index.html --report=test-results/test-run-report.html -o junit_family=xunit2 --junit-xml=test-results/junit_test_report.xml
133-
134-
- name: Generate tests report
135-
if: always()
136-
uses: pmeier/pytest-results-action@main
137-
with:
138-
path: test-results/junit_test_report.xml
139-
summary: true
140-
display-options: fEX
141-
fail-on-empty: true
142-
143-
- name: Upload test report
144-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
145-
if: success() || failure()
146-
with:
147-
name: playwright-tests-report
148-
path: test-results/
149-
retention-days: 3
150-
151-
- name: Download test artifacts
152-
uses: actions/download-artifact@v4.1.8
153-
if: success() || failure()
154-
with:
155-
name: playwright-tests-report
156-
path: test-results/
157-
158-
- name: Display structure of downloaded files
159-
if: always()
160-
run: ls -R
161-
working-directory: test-results
162-
163-
- name: Publish test report
164-
id: test_summary
165-
uses: mikepenz/action-junit-report@v5.2.0
166-
if: success() || failure()
167-
with:
168-
report_paths: test-results/junit_test_report.xml
169-
170-
- name: Notify Slack
171-
id: slack
172-
uses: slackapi/slack-github-action@v2.0.0
173-
with:
174-
channel-id: C058RPVS5DZ
175-
payload: |
176-
{
177-
"blocks": [
178-
{
179-
"type": "section",
180-
"text": {
181-
"type": "mrkdwn",
182-
"text": "*Tests result:*"
183-
}
184-
},
185-
{
186-
"type": "section",
187-
"text": {
188-
"type": "mrkdwn",
189-
"text": "Tests :test_tube:\t\t\tPassed :check:\t\t\tSkipped :arrow_right_hook:\t\t\tFailed :x:\n>executed:*${{steps.test_summary.outputs.total}}*\t\t\tpassed:*${{steps.test_summary.outputs.passed}}*\t\t\tskipped:*${{steps.test_summary.outputs.skipped}}*\t\t\tfailed:*${{steps.test_summary.outputs.failed}}*"
190-
}
191-
},
192-
{
193-
"type": "section",
194-
"text": {
195-
"type": "mrkdwn",
196-
"text": "*View result on Github:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
197-
}
198-
}
199-
]
200-
}
201-
if: always()
202-
env:
203-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
204-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
106+
# - name: Setup wego enterprise
107+
# run: |
108+
# kubectl create namespace flux-system
109+
# flux install
110+
# kubectl create secret generic git-provider-credentials -n flux-system --from-literal=username="weave-gitops-bot" --from-literal=password="${WEAVEWORKS_BOT_TOKEN}"
111+
# sed -i 's/BRANCH_NAME/${{ steps.extract_branch.outputs.branch_name }}/' ./utils/scripts/resources/flux-system-gitrepo.yaml
112+
# ./utils/scripts/wego-enterprise.sh setup ./utils/scripts
113+
#
114+
# - name: Install violating-app
115+
# run: |
116+
# kubectl apply -f ./utils/data/violating-podinfo-kustomization.yaml
117+
#
118+
# - name: Install policies
119+
# run: |
120+
# kubectl apply -f ./utils/data/policies.yaml
121+
#
122+
# - name: Flux reconcile violating app
123+
# run: |
124+
# flux reconcile kustomization violating-podinfo -n default --with-source || true
125+
# kubectl get pods -A
126+
#
127+
# - name: Install gitopsset-configmaps
128+
# run: |
129+
# kubectl apply -f ./utils/data/gitops-sets-kustomization.yaml
130+
#
131+
# - name: run tests
132+
# if: success()
133+
# run: |
134+
# pytest -s -v --video=retain-on-failure --screenshot=only-on-failure --template=html1/index.html --report=test-results/test-run-report.html -o junit_family=xunit2 --junit-xml=test-results/junit_test_report.xml
135+
#
136+
# - name: Generate tests report
137+
# if: always()
138+
# uses: pmeier/pytest-results-action@main
139+
# with:
140+
# path: test-results/junit_test_report.xml
141+
# summary: true
142+
# display-options: fEX
143+
# fail-on-empty: true
144+
#
145+
# - name: Upload test report
146+
# uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
147+
# if: success() || failure()
148+
# with:
149+
# name: playwright-tests-report
150+
# path: test-results/
151+
# retention-days: 3
152+
#
153+
# - name: Download test artifacts
154+
# uses: actions/download-artifact@v4.1.8
155+
# if: success() || failure()
156+
# with:
157+
# name: playwright-tests-report
158+
# path: test-results/
159+
#
160+
# - name: Display structure of downloaded files
161+
# if: always()
162+
# run: ls -R
163+
# working-directory: test-results
164+
#
165+
# - name: Publish test report
166+
# id: test_summary
167+
# uses: mikepenz/action-junit-report@v5.2.0
168+
# if: success() || failure()
169+
# with:
170+
# report_paths: test-results/junit_test_report.xml
171+
#
172+
# - name: Notify Slack
173+
# id: slack
174+
# uses: slackapi/slack-github-action@v2.0.0
175+
# with:
176+
# channel-id: C058RPVS5DZ
177+
# payload: |
178+
# {
179+
# "blocks": [
180+
# {
181+
# "type": "section",
182+
# "text": {
183+
# "type": "mrkdwn",
184+
# "text": "*Tests result:*"
185+
# }
186+
# },
187+
# {
188+
# "type": "section",
189+
# "text": {
190+
# "type": "mrkdwn",
191+
# "text": "Tests :test_tube:\t\t\tPassed :check:\t\t\tSkipped :arrow_right_hook:\t\t\tFailed :x:\n>executed:*${{steps.test_summary.outputs.total}}*\t\t\tpassed:*${{steps.test_summary.outputs.passed}}*\t\t\tskipped:*${{steps.test_summary.outputs.skipped}}*\t\t\tfailed:*${{steps.test_summary.outputs.failed}}*"
192+
# }
193+
# },
194+
# {
195+
# "type": "section",
196+
# "text": {
197+
# "type": "mrkdwn",
198+
# "text": "*View result on Github:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
199+
# }
200+
# }
201+
# ]
202+
# }
203+
# if: always()
204+
# env:
205+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
206+
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
205207

206208
- name : Delete test cluster
207209
if: success() || failure()

playwright/utils/scripts/mgmt-cluster-setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function setup_gke {
8787

8888
export CLUSTER_NAME=${args[2]}
8989
export CLUSTER_REGION=${args[3]}
90-
export CLUSTER_VERSION=1.23.13
90+
export CLUSTER_VERSION=1.31.0
9191

9292
export CLUSTER_EXISTS=$(gcloud container clusters list | grep -i $CLUSTER_NAME)
9393
if [ -z $CLUSTER_EXISTS ]; then
@@ -129,7 +129,7 @@ function setup_kind {
129129

130130
export CLUSTER_NAME=${args[2]}
131131

132-
kind create cluster --name $CLUSTER_NAME --image=kindest/node:v1.23.4 --config ${args[1]}/utils/data/kind/local-kind-config.yaml
132+
kind create cluster --name $CLUSTER_NAME --image=kindest/node:v1.31.0 --config ${args[1]}/utils/data/kind/local-kind-config.yaml
133133
kubectl wait --for=condition=Ready --timeout=120s -n kube-system pods --all
134134
kubectl get pods -A
135135
exit 0
@@ -141,4 +141,4 @@ elif [ ${args[0]} = 'gke' ]; then
141141
setup_gke
142142
elif [ ${args[0]} = 'kind' ]; then
143143
setup_kind
144-
fi
144+
fi

0 commit comments

Comments
 (0)