11name : Meticulous Visual Regression Tests
22
33on :
4+ push :
5+ branches : [master]
46 pull_request :
57 branches : [master]
6- types : [opened, synchronize, reopened]
8+ workflow_dispatch : {}
79
810permissions :
11+ actions : write
912 contents : read
13+ issues : write
1014 pull-requests : write
15+ statuses : read
1116
1217jobs :
1318 test :
@@ -18,63 +23,11 @@ jobs:
1823 steps :
1924 - name : Checkout code
2025 uses : actions/checkout@v4
21- with :
22- fetch-depth : 0 # Fetch all history for base comparison
23-
24- - name : Setup Node.js
25- uses : actions/setup-node@v4
26- with :
27- node-version : ' 22'
28-
29- - name : Install Meticulous CLI
30- run : npm install -g @alwaysmeticulous/cli
31-
32- - name : Prepare for tests
33- id : prepare
34- env :
35- METICULOUS_API_TOKEN : ${{ secrets.METICULOUS_API_TOKEN }}
36- run : |
37- # Prepare for Meticulous tests - this triggers test run generation on base
38- npx @alwaysmeticulous/cli prepare-for-meticulous-tests \
39- --apiToken="${METICULOUS_API_TOKEN}" \
40- --headCommit="${{ github.event.pull_request.head.sha }}" \
41- --baseCommit="${{ github.event.pull_request.base.sha }}"
4226
4327 - name : Run Meticulous tests
44- env :
45- METICULOUS_API_TOKEN : ${{ secrets.METICULOUS_API_TOKEN }}
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47- run : |
48- # Run tests and post results to PR
49- npx @alwaysmeticulous/cli run-all-tests-in-cloud \
50- --apiToken="${METICULOUS_API_TOKEN}" \
51- --headCommit="${{ github.event.pull_request.head.sha }}" \
52- --baseCommit="${{ github.event.pull_request.base.sha }}" \
53- --appUrl="http://a414a6a1e26174420a74aa4eb4ae4df3-1583809330.us-west-2.elb.amazonaws.com:5678" \
54- --githubToken="${GITHUB_TOKEN}" \
55- --repo="${{ github.repository }}" \
56- --pullRequestNumber="${{ github.event.pull_request.number }}"
57-
58- - name : Comment on PR
59- if : always()
60- uses : actions/github-script@v7
28+ uses : alwaysmeticulous/report-diffs-action@v2
6129 with :
62- script : |
63- const message = `## 🎭 Meticulous Visual Regression Tests
64-
65- Meticulous has finished analyzing this PR!
66-
67- Check the [Meticulous dashboard](https://app.meticulous.ai) for detailed visual diffs.
68-
69- - **Base commit**: \`${{ github.event.pull_request.base.sha }}\`
70- - **Head commit**: \`${{ github.event.pull_request.head.sha }}\`
71- - **Test URL**: http://a414a6a1e26174420a74aa4eb4ae4df3-1583809330.us-west-2.elb.amazonaws.com:5678
72- `;
73-
74- github.rest.issues.createComment({
75- issue_number: context.issue.number,
76- owner: context.repo.owner,
77- repo: context.repo.repo,
78- body: message
79- });
30+ api-token : ${{ secrets.METICULOUS_API_TOKEN }}
31+ # Test against your live production n8n instance
32+ base-url : ' http://a414a6a1e26174420a74aa4eb4ae4df3-1583809330.us-west-2.elb.amazonaws.com:5678'
8033
0 commit comments