From 81130db3b5e3907bfd8c3d7cf8d1ab0f3e1d06ef Mon Sep 17 00:00:00 2001 From: In3luki <41452412+In3luki@users.noreply.github.com> Date: Fri, 26 Apr 2024 14:30:23 +0200 Subject: [PATCH] Testing --- .github/workflows/ci.yml | 13 +++++++++---- package.json | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d4c8d82aeb..4424a3a33c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Git + run: | + git remote add upstream https://github.com/foundryvtt/pf2e.git + git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 upstream master + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: @@ -36,10 +41,10 @@ jobs: run: | npm ci - - name: Build - run: | - npm run build - - name: Test run: | npm run test + + - name: Build + run: | + npm run build diff --git a/package.json b/package.json index 4d9c62d2b49..b91e7321988 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,11 @@ "hot": "vite serve", "link": "tsx ./build/link-foundry.ts", "extractPacks": "tsx ./build/extract-packs.ts", - "pretest": "npm run lint", + "pretest": "npm run lint:ci", "test": "jest", "migrate": "tsx ./build/run-migration.ts", "lint": "npm run lint:ts && npm run lint:json && npm run prettier:scss", + "lint:ci": "eslint $(git diff --name-only --diff-filter=ACMRTUXB upstream/master | grep -E \".ts$\") && npm run prettier:scss", "lint:ts": "eslint ./build ./src ./tests ./types --ext .ts", "prettier:scss": "prettier --check src/styles", "lint:json": "eslint ./static --ext .json --no-eslintrc --plugin json --rule \"json/*: error\" --rule \"linebreak-style: error\"",