-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add diff to summary * close details * Use github-script * move it * more space * Add to generator as well * Fix category
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,6 +91,19 @@ jobs: | |
- name: Generate diff | ||
run: | | ||
diff -u outputdata/diff/${{ matrix.category }}_before.json outputdata/diff/${{ matrix.category }}_after.json > outputdata/diff/${{ matrix.category }}.diff || true | ||
cat outputdata/diff/${{ matrix.category }}.diff | ||
- name: Upload diff | ||
uses: actions/[email protected] | ||
env: | ||
CATEGORY: ${{ matrix.category }} | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const diffContents = fs.readFileSync(`outputdata/diff/${process.env.CATEGORY}.diff`); | ||
core.summary.addDetails(`${process.env.CATEGORY}.diff contents`, `\n\n\`\`\`diff\n${diffContents}\`\`\`\n\n`) | ||
core.summary.write() | ||
- name: Upload artifacts | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,18 @@ jobs: | |
diff -u outputdata/diff/${{ matrix.entry.category }}_before.json outputdata/diff/${{ matrix.entry.category }}_after.json > outputdata/diff/${{ matrix.entry.category }}.diff || true | ||
cat outputdata/diff/${{ matrix.entry.category }}.diff | ||
- name: Upload diff | ||
uses: actions/[email protected] | ||
env: | ||
CATEGORY: ${{ matrix.entry.category }} | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const diffContents = fs.readFileSync(`outputdata/diff/${process.env.CATEGORY}.diff`); | ||
core.summary.addDetails(`${process.env.CATEGORY}.diff contents`, `\n\n\`\`\`diff\n${diffContents}\`\`\`\n\n`) | ||
core.summary.write() | ||
- name: Validate output with JQ | ||
run: | | ||
jq -c . outputdata/${{ matrix.entry.category }}/data.json | ||
|