File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 deploy-preview :
1818 name : Push Preview to Netlify
1919 runs-on : ubuntu-latest
20+ outputs :
21+ PREVIEW_URL : ${{ steps.deploy.outputs.PREVIEW_URL }}
2022 permissions :
2123 deployments : write # deployments
2224 statuses : write # commit statuses
6365 run : npm install -g netlify-cli
6466
6567 - name : Deploy to Netlify
68+ id : deploy
6669 if : env.PR_NUMBER != ''
6770 env :
6871 NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
8588 echo "DEPLOY_URL=$DEPLOY_URL"
8689 echo "DEPLOY_ID=$DEPLOY_ID"
8790 } >>"$GITHUB_ENV"
91+ echo "PREVIEW_URL=$PREVIEW_URL" >> "$GITHUB_OUTPUT"
8892
8993 - name : Post PR Comment
9094 if : env.PR_NUMBER != ''
@@ -222,3 +226,27 @@ jobs:
222226 -f state="success" \
223227 -f environment_url="${{ env.DEPLOY_URL }}" \
224228 -f description="Preview is ready!"
229+
230+ e2e-staging :
231+ name : UI tests on staging deployment
232+ runs-on : ubuntu-latest
233+ needs : deploy-preview
234+ if : needs.deploy-preview.result == 'success'
235+ steps :
236+ - name : Check out repository
237+ uses : actions/checkout@v6
238+ with :
239+ ref : ${{ github.event.workflow_run.head_sha }}
240+
241+ - name : Install Nix
242+ uses : cachix/install-nix-action@19effe9fe722874e6d46dd7182e4b8b7a43c4a99 # v31.10.0
243+
244+ - uses : cachix/cachix-action@v16
245+ with :
246+ name : ngi-forge
247+
248+ - name : Run Playwright tests
249+ run : |
250+ nix develop -c playwright test -c ui/tests/e2e
251+ env :
252+ BASE_URL : ${{ needs.deploy-preview.outputs.PREVIEW_URL }}
Original file line number Diff line number Diff line change 3434 - name : Run checks
3535 run : nix flake check --accept-flake-config
3636
37+ e2e-local :
38+ name : UI tests local
39+ runs-on : ubuntu-latest
40+ needs : test
41+ steps :
42+ - name : Check out repository
43+ uses : actions/checkout@v6
44+
45+ - name : Install Nix
46+ uses : cachix/install-nix-action@19effe9fe722874e6d46dd7182e4b8b7a43c4a99 # v31.10.0
47+
48+ - uses : cachix/cachix-action@v16
49+ with :
50+ name : ngi-forge
51+
52+ - name : Run Playwright tests
53+ run : |
54+ nix develop -c playwright test -c ui/tests/e2e
55+
3756 build-preview-ui :
3857 name : Build UI artifact
3958 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 2626 self' . packages . elm-watch
2727 self' . packages . elm2nix
2828 playwright-test
29+ playwright-driver . browsers
2930 systemd-manager-tui
3031 watchman
3132 podman-compose
3940 ( devShell . extend (
4041 final : prev : {
4142 packages = prev . packages ++ devPkgs ;
43+ env = ( prev . env or [ ] ) ++ [
44+ {
45+ name = "PLAYWRIGHT_BROWSERS_PATH" ;
46+ value = "${ pkgs . playwright-driver . browsers } " ;
47+ }
48+ {
49+ name = "PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD" ;
50+ value = "1" ;
51+ }
52+ {
53+ name = "PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS" ;
54+ value = "1" ;
55+ }
56+ ] ;
4257 }
4358 ) ) . finalPackage ;
4459 } ;
Original file line number Diff line number Diff line change 6767 "commands"
6868 "packages"
6969 "packagesFrom"
70+ "env"
7071
7172 "devshell"
7273 "bash"
You can’t perform that action at this time.
0 commit comments