fix(ci): Fix result overwrite (#3700)

Buttoning up fixes from #3695
This commit is contained in:
Jamil
2024-02-20 15:46:59 -08:00
committed by GitHub
parent 7ff40b82ed
commit 0598ca55c3
2 changed files with 3 additions and 3 deletions

View File

@@ -320,9 +320,8 @@ jobs:
curl -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -L -o "${ARTIFACT_NAME}.zip" "$DOWNLOAD_URL"
set -x
unzip "${ARTIFACT_NAME}.zip"
unzip "${ARTIFACT_NAME}.zip" -d "./main"
rm "${ARTIFACT_NAME}.zip"
mv "${{ matrix.test_name }}.json" "${{ matrix.test_name }}-main.json"
fi
- name: Update PR with results
uses: actions/github-script@v7

View File

@@ -1,4 +1,5 @@
const fs = require("fs");
const path = require("path");
function getDiffPercents(main, current) {
let diff = -1 * (100 - current / (main / 100));
@@ -40,7 +41,7 @@ exports.script = async function (github, context, test_name) {
// 2. Read the main results
const results_main = JSON.parse(
fs.readFileSync(test_name + "-main.json")
fs.readFileSync(path.join("main", test_name + ".json"))
).end;
let output = "";