Skip to content

Commit 576b20a

Browse files
authored
Fix manual testing workflow (#737)
1 parent 6eb2842 commit 576b20a

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/manual-rule-test.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
with:
1919
app-id: 999945
2020
private-key: ${{ secrets.RESYNTAX_APP_PRIVATE_KEY }}
21+
owner: jackfirth
2122

2223
- name: Get GitHub App User ID
2324
id: get-user-id
@@ -35,10 +36,12 @@ jobs:
3536
uses: Bogdanp/[email protected]
3637
with:
3738
version: current
38-
local_catalogs: $GITHUB_WORKSPACE
39+
distribution: minimal
40+
dest: ${HOME}/racketdist
41+
sudo: never
3942

40-
- name: Ensure test corpus packages are installed
41-
run: raco pkg install --auto --no-setup scribble-doc scribble-html-lib scribble-lib scribble-test scribble-text-lib scribble
43+
- name: Ensure all test corpus packages are installed
44+
run: raco pkg install --auto --no-setup --installation --skip-installed scribble-doc scribble-html-lib scribble-lib scribble-test scribble-text-lib scribble
4245

4346
- name: Update test corpus packages to local dirs
4447
run: raco pkg update --link --no-setup scribble-8.18/scribble-doc scribble-8.18/scribble-html-lib scribble-8.18/scribble-lib scribble-8.18/scribble-test scribble-8.18/scribble-text-lib scribble-8.18/scribble
@@ -75,28 +78,29 @@ jobs:
7578
--max-pass-count 1 \
7679
--output-as-json \
7780
--create-multiple-commits)" >> "$GITHUB_OUTPUT"
81+
82+
- name: Log summary JSON
83+
run: echo '${{ steps.run-resyntax.outputs.SUMMARY_JSON }}'
7884

7985
- name: Push fixes to remote branch
80-
if: ${{ steps.run-resyntax.outputs.SUMMARY_JSON.fix_count > 0 }}
86+
if: ${{ fromJSON(steps.run-resyntax.outputs.SUMMARY_JSON).fix_count > 0 }}
8187
uses: actions/[email protected]
8288
with:
8389
github-token: ${{ steps.generate-token.outputs.token }}
8490
script: |
8591
await exec.exec(
86-
'git push --set-upstream origin autofix-${{ github.run_number }}-${{ github.run_attempt }}',
87-
[],
88-
{cwd: 'cloned-package'});
92+
'git push --set-upstream origin autofix-${{ github.run_number }}-${{ github.run_attempt }}');
8993
9094
- name: Create pull request
91-
if: ${{ steps.run-resyntax.outputs.SUMMARY_JSON.fix_count > 0 }}
95+
if: ${{ fromJSON(steps.run-resyntax.outputs.SUMMARY_JSON).fix_count > 0 }}
9296
uses: actions/[email protected]
9397
env:
9498
SUMMARY_JSON: ${{ steps.run-resyntax.outputs.SUMMARY_JSON }}
9599
with:
96100
github-token: ${{ steps.generate-token.outputs.token }}
97101
script: |
98102
const { readFile, writeFile } = require('fs/promises');
99-
const commitMessageBody = process.env.SUMMARY_JSON.commit_message_body;
103+
const commitMessageBody = JSON.parse(process.env.SUMMARY_JSON).commit_message_body;
100104
const targetRepo = await github.rest.repos.get({owner: "jackfirth", repo: "resyntax-test-corpus"});
101105
console.log(targetRepo);
102106
const base = targetRepo.data.default_branch

0 commit comments

Comments
 (0)