diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d4c8d82aeb..615cd2011a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Git + run: | + git remote add upstream https://github.com/foundryvtt/pf2e.git + git fetch upstream master + shell: bash + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: @@ -36,10 +42,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..40952e8d816 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 origin/master HEAD) --ext .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\"",