diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index f27cd2dbe..6e86fabc5 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -36,10 +36,8 @@ jobs: steps: - uses: actions/checkout@v4 - - run: git clone https://github.com/is-a-dev/register.git register-${{ github.run_id }} - - - run: ls domains -1 | wc -l - - run: ls register-${{ github.run_id }}/domains -1 | wc -l + - name: Clone is-a-dev/register + run: git clone https://github.com/is-a-dev/register.git register-${{ github.run_id }} - run: npm install diff --git a/tests/pr.test.js b/tests/pr.test.js index 15b00c813..a590b0b4c 100644 --- a/tests/pr.test.js +++ b/tests/pr.test.js @@ -3,7 +3,7 @@ const fs = require("fs-extra"); const path = require("path"); const PR_AUTHOR = process.env.PR_AUTHOR; -const MODIFIED_FILES = (process.env.MODIFIED_FILES || "").split(" ").map(file => file.replace(/^domains\//, "")); +const MODIFIED_FILES = (process.env.MODIFIED_FILES || "").split(" ").map((file) => file.replace(/^domains\//, "")); const EVENT = process.env.EVENT; const RUN_ID = process.env.RUN_ID; @@ -47,10 +47,10 @@ t("New JSON files must be owned by the PR author", async (t) => { if (EVENT !== "pull_request") return t.pass(); const headDomainsFiles = fs.readdirSync(headDomainsPath); - - const newFiles = headDomainsFiles.filter((file) => !fs.existsSync(path.join(domainsPath, file))); - console.log("New files", newFiles); + const newFiles = domainsPath.filter((file) => !fs.existsSync(path.join(headDomainsFiles, file))); + + console.log(newFiles); await Promise.all( newFiles.map(async (file) => {