Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danieljk
actual-vt-capstone
Commits
2762495a
Unverified
Commit
2762495a
authored
2 years ago
by
Jed Fox
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix end-to-end testing workflow (#758)
parent
d25c3108
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/e2e-test.yml
+7
-15
7 additions, 15 deletions
.github/workflows/e2e-test.yml
bin/netlify-wait-for-build
+40
-0
40 additions, 0 deletions
bin/netlify-wait-for-build
upcoming-release-notes/758.md
+6
-0
6 additions, 0 deletions
upcoming-release-notes/758.md
with
53 additions
and
15 deletions
.github/workflows/e2e-test.yml
+
7
−
15
View file @
2762495a
...
...
@@ -15,24 +15,16 @@ jobs:
uses
:
./.github/actions/setup
-
name
:
Setup Playwright
run
:
npx playwright install chromium --with-deps
-
name
:
Wait for Pages changed to neutral
uses
:
fountainhead/action-wait-for-check@v1.1.0
id
:
wait-for-Netlify
with
:
token
:
${{ secrets.GITHUB_TOKEN }}
ref
:
${{ github.event.pull_request.head.sha || github.sha }}
checkName
:
'
Pages
changed
-
actualbudget'
-
name
:
Waiting for Netlify Preview
if
:
steps.wait-for-Netlify.outputs.conclusion == 'neutral'
uses
:
jakepartusch/wait-for-netlify-action@v1.4
id
:
waitFor200
with
:
site_name
:
'
actualbudget'
max_timeout
:
240
-
name
:
Wait for Netlify build to finish
id
:
netlify
env
:
COMMIT_SHA
:
${{ github.event.pull_request.head.sha }}
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
run
:
./bin/netlify-wait-for-build
-
name
:
Run E2E Tests on Netlify URL
run
:
yarn e2e
env
:
E2E_START_URL
:
https://deploy-preview-${{env.GITHUB_PR_NUMBER}}--actualbudget.netlify.app
E2E_START_URL
:
${{ steps.netlify.outputs.url }}
-
uses
:
actions/upload-artifact@v3
if
:
always()
with
:
...
...
This diff is collapsed.
Click to expand it.
bin/netlify-wait-for-build
0 → 100755
+
40
−
0
View file @
2762495a
#!/bin/bash
current_commit
=
$(
git rev-parse HEAD
)
echo
"Running on commit
$COMMIT_SHA
"
function
get_status
()
{
echo
"::group::API Response"
curl
--header
"Authorization: Bearer
$GITHUB_TOKEN
"
"https://api.github.com/repos/actualbudget/actual/commits/
$COMMIT_SHA
/statuses"
>
/tmp/status.json
cat
/tmp/status.json
echo
"::endgroup::"
netlify
=
$(
jq
'[.[] | select(.context == "netlify/actualbudget/deploy-preview")][0]'
/tmp/status.json
)
state
=
$(
jq
-r
'.state'
<<<
"
$netlify
"
)
echo
"::group::Netlify Status"
echo
"
$netlify
"
echo
"::endgroup::"
}
get_status
while
[
"
$netlify
"
==
"null"
]
;
do
echo
"Waiting for Netlify to start building..."
sleep
10
get_status
done
while
[
"
$state
"
==
"pending"
]
;
do
echo
"Waiting for Netlify to finish building..."
sleep
10
get_status
done
if
[
"
$state
"
==
"success"
]
;
then
echo
-e
"
\0
33[0;32mNetlify build succeeded!
\0
33[0m"
jq
-r
'"url=" + .target_url'
<<<
"
$netlify
"
>
$GITHUB_OUTPUT
exit
0
else
echo
-e
"
\0
33[0;31mNetlify build failed. Cancelling end-to-end tests.
\0
33[0m"
exit
1
fi
This diff is collapsed.
Click to expand it.
upcoming-release-notes/758.md
0 → 100644
+
6
−
0
View file @
2762495a
---
category
:
Maintenance
authors
:
[
j-f1
]
---
Fix end-to-end testing workflow
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment