Skip to content

Commit eeaa0e2

Browse files
committed
Add tesult config
1 parent 08e9364 commit eeaa0e2

File tree

34 files changed

+16356
-60
lines changed

34 files changed

+16356
-60
lines changed

.github/workflows/e2e.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
# The type of runner that the job will run on
2121
name: Run Wp-custom-menu fields
2222
runs-on: ubuntu-latest
23+
env:
24+
SHA: ${{ github.event.pull_request.head.sha }}
25+
COMMIT_SHA: ${{ github.sha }}
26+
PR_NUMBER: ${{ github.event.pull_request.number }}
27+
working-directory: ./tests/e2e-playwright
28+
TESRESULT_TOKEN: ${{ secrets.TESRESULT_TOKEN }}
2329

2430
# Steps represent a sequence of tasks that will be executed as part of the job
2531
steps:
@@ -47,6 +53,11 @@ jobs:
4753
name: report
4854
path: ./tests/e2e-playwright/artifacts
4955

56+
- name: run PR status
57+
if: ${{ always() }}
58+
run: node ./tests/e2e-playwright/bin/pr-status.js
59+
working-directory: ${{env.working_directory}}
60+
5061
- name: Cleanup
5162
if: ${{ always() }}
5263
uses: rtCamp/action-cleanup@master
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"cookies":[{"name":"wordpress_test_cookie","value":"WP+Cookie+check","domain":"alvitest.local","path":"/","expires":-1,"httpOnly":false,"secure":false,"sameSite":"Lax"},{"name":"wordpress_a8bbc7d53fe4fdfc57ea2b5df1c68cde","value":"automation%7C1670611539%7CF8BVTKepTJg2NFRGF9Qz93xu1nFcb4qugUH6ZQ1wSD1%7C84ad9f7f3bbfbe7132fe4a5de1c1b9923420a862cf706c8045ad4ef71e2310c2","domain":"alvitest.local","path":"/wp-content/plugins","expires":-1,"httpOnly":true,"secure":false,"sameSite":"Lax"},{"name":"wordpress_a8bbc7d53fe4fdfc57ea2b5df1c68cde","value":"automation%7C1670611539%7CF8BVTKepTJg2NFRGF9Qz93xu1nFcb4qugUH6ZQ1wSD1%7C84ad9f7f3bbfbe7132fe4a5de1c1b9923420a862cf706c8045ad4ef71e2310c2","domain":"alvitest.local","path":"/wp-admin","expires":-1,"httpOnly":true,"secure":false,"sameSite":"Lax"},{"name":"wordpress_logged_in_a8bbc7d53fe4fdfc57ea2b5df1c68cde","value":"automation%7C1670611539%7CF8BVTKepTJg2NFRGF9Qz93xu1nFcb4qugUH6ZQ1wSD1%7Cc979634f566006b229b54d2b130c1c672cdb341384425d6b39c02904b069fed4","domain":"alvitest.local","path":"/","expires":-1,"httpOnly":true,"secure":false,"sameSite":"Lax"},{"name":"wp-settings-time-2","value":"1670438739","domain":"alvitest.local","path":"/","expires":1701974739.692,"httpOnly":false,"secure":false,"sameSite":"Lax"}],"nonce":"d5c613f16b","rootURL":"http://alvitest.local/wp-json/"}

tests/e2e-playwright/bin/pr-status.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env node
2+
// Octokit.js
3+
// https://github.com/octokit/core.js#readme
4+
5+
const { Octokit } = require("@octokit/core");
6+
7+
const octokit = new Octokit({
8+
auth: process.env.TOKEN,
9+
});
10+
11+
octokit.request("POST /repos/{org}/{repo}/statuses/{sha}", {
12+
org: "rtCamp",
13+
repo: "wp-menu-custom-fields",
14+
sha: process.env.SHA ? process.env.SHA : process.env.COMMIT_SHA,
15+
state: "success",
16+
conclusion: "success",
17+
target_url:
18+
"https://www.tesults.com/results/rsp/view/results/project/0cf2aaec-c944-4b1e-afd9-7cd4bd2e49a1",
19+
description: "Successfully synced to Tesults",
20+
context: "E2E Test Result",
21+
});

tests/e2e-playwright/e2e-test-utils-playwright/build/config.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)