Skip to content

Commit 5fed45c

Browse files
committed
ci stuff
1 parent a645f61 commit 5fed45c

3 files changed

Lines changed: 32 additions & 58 deletions

File tree

.github/workflows/deploy-github-pages.yml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ jobs:
6262
with:
6363
global-json-file: global.json
6464

65+
- name: Expose GitHub Actions Runtime
66+
uses: actions/github-script@v7
67+
with:
68+
script: |
69+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
70+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
71+
6572
- name: Test supporting suites
6673
run: |
6774
dotnet test --project "$CORE_TEST_PROJECT"
@@ -94,10 +101,6 @@ jobs:
94101
needs: build_browser_suite
95102
runs-on: macos-latest
96103

97-
env:
98-
BROWSER_TEST_LOG_DIR: output/test-results/browser-suite
99-
BROWSER_TEST_LOG_PATH: output/test-results/browser-suite/browser-suite.log
100-
101104
permissions:
102105
contents: read
103106

@@ -110,6 +113,13 @@ jobs:
110113
with:
111114
global-json-file: global.json
112115

116+
- name: Expose GitHub Actions Runtime
117+
uses: actions/github-script@v7
118+
with:
119+
script: |
120+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
121+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
122+
113123
- name: Restore solution
114124
run: dotnet restore "$SOLUTION_FILE"
115125

@@ -120,31 +130,7 @@ jobs:
120130
run: node "$PLAYWRIGHT_CLI" install chromium
121131

122132
- name: Test browser suite
123-
id: browser_tests
124-
shell: bash
125-
run: |
126-
set -o pipefail
127-
mkdir -p "$BROWSER_TEST_LOG_DIR"
128-
dotnet test --project "$UI_TEST_PROJECT" 2>&1 | tee "$BROWSER_TEST_LOG_PATH"
129-
130-
- name: Summarize browser suite
131-
if: always()
132-
shell: bash
133-
env:
134-
BROWSER_TEST_OUTCOME: ${{ steps.browser_tests.outcome }}
135-
run: |
136-
bash ./scripts/ci/write-browser-suite-summary.sh \
137-
"$BROWSER_TEST_LOG_PATH" \
138-
"$BROWSER_TEST_OUTCOME" \
139-
"Run Browser Suite" >> "$GITHUB_STEP_SUMMARY"
140-
141-
- name: Upload browser test logs
142-
if: always()
143-
uses: actions/upload-artifact@v7
144-
with:
145-
name: browser-test-logs-release-pipeline
146-
path: ${{ env.BROWSER_TEST_LOG_DIR }}
147-
if-no-files-found: ignore
133+
run: dotnet test --project "$UI_TEST_PROJECT"
148134

149135
- name: Upload Playwright artifacts
150136
if: always()

.github/workflows/pr-validation.yml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ jobs:
5454
with:
5555
global-json-file: global.json
5656

57+
- name: Expose GitHub Actions Runtime
58+
uses: actions/github-script@v7
59+
with:
60+
script: |
61+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
62+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
63+
5764
- name: Test supporting suites
5865
run: |
5966
dotnet test --project "$CORE_TEST_PROJECT"
@@ -83,10 +90,6 @@ jobs:
8390
needs: build_browser_suite
8491
runs-on: macos-latest
8592

86-
env:
87-
BROWSER_TEST_LOG_DIR: output/test-results/browser-suite
88-
BROWSER_TEST_LOG_PATH: output/test-results/browser-suite/browser-suite.log
89-
9093
steps:
9194
- name: Checkout
9295
uses: actions/checkout@v6
@@ -96,6 +99,13 @@ jobs:
9699
with:
97100
global-json-file: global.json
98101

102+
- name: Expose GitHub Actions Runtime
103+
uses: actions/github-script@v7
104+
with:
105+
script: |
106+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
107+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
108+
99109
- name: Restore solution
100110
run: dotnet restore "$SOLUTION_FILE"
101111

@@ -106,31 +116,7 @@ jobs:
106116
run: node "$PLAYWRIGHT_CLI" install chromium
107117

108118
- name: Test browser suite
109-
id: browser_tests
110-
shell: bash
111-
run: |
112-
set -o pipefail
113-
mkdir -p "$BROWSER_TEST_LOG_DIR"
114-
dotnet test --project "$UI_TEST_PROJECT" --verbosity normal 2>&1 | tee "$BROWSER_TEST_LOG_PATH"
115-
116-
- name: Summarize browser suite
117-
if: always()
118-
shell: bash
119-
env:
120-
BROWSER_TEST_OUTCOME: ${{ steps.browser_tests.outcome }}
121-
run: |
122-
bash ./scripts/ci/write-browser-suite-summary.sh \
123-
"$BROWSER_TEST_LOG_PATH" \
124-
"$BROWSER_TEST_OUTCOME" \
125-
"Run Browser Suite" >> "$GITHUB_STEP_SUMMARY"
126-
127-
- name: Upload browser test logs
128-
if: always()
129-
uses: actions/upload-artifact@v7
130-
with:
131-
name: browser-test-logs-pr-validation
132-
path: ${{ env.BROWSER_TEST_LOG_DIR }}
133-
if-no-files-found: ignore
119+
run: dotnet test --project "$UI_TEST_PROJECT" --verbosity normal
134120

135121
- name: Upload Playwright artifacts
136122
if: always()

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ Rule format:
104104
- Editor top-toolbar search must remain visible in narrow layouts; when width runs out, the other toolbar groups should become explicitly horizontally scrollable/reachable before search is allowed to disappear.
105105
- Do not push branches or `main` without an explicit user command for that push; local commits are allowed, but network publish actions require clear approval in the current conversation.
106106
- When a CI test job fails, times out, or is cancelled, the workflow summary must still state which tests failed or that the run ended before per-test failure data was available; do not leave browser-suite failures represented only by generic job annotations.
107+
- Do not add or raise CI timeout settings as a fix for browser-suite instability or slow runs; fix the underlying failure path cleanly instead of masking it with workflow or step timeouts.
108+
- For TUnit reporting in GitHub Actions, prefer TUnit's built-in HTML report and the documented `actions/github-script` runtime exposure step over repo-local custom summary scripts or ad-hoc log parsers.
107109
- Public web hosting is split by role: the standalone PrompterOne app in this repo must publish on `app.prompter.one`, while the marketing landing site for `prompter.one` lives in the separate `PrompterOne-LandingPage` repository.
108110
- For deploy-only, domain, CI, or static-site hosting tasks, do not spend time on unrelated app/browser test suites unless the user explicitly asks or the runtime behavior itself changes; prefer workflow, build, and publish-config validation only.
109111
- Repo-wide .NET SDK and test-runner selection belong in the root `global.json`; do not split `global.json` test-runner opt-ins per project or subfolder once the user asks for a global test-platform policy.

0 commit comments

Comments
 (0)