Forráskód Böngészése

👷 CI: fix azure ci (#6004)

* 👷 CI: try fix azure ci

* 👷 CI : remove node@8 version

* 👷 CI : fix window ci error

* 🙈 ignore: ignore CNAME

* 👷 CI : open HEADLESS

* 👷 CI : new rebase script

* 👷 CI :add issue auto reference

* 👷 CI :add GitHub_Pages_Deploy action

* 👷 CI :add GitHub_Pages_Deploy action
陈帅 5 éve
szülő
commit
f3ab68d5d8

+ 7 - 0
.github/GitHub_Pages_Deploy.workflow

@@ -0,0 +1,7 @@
+action "Deploy to GitHub Pages" {
+  uses = "maxheld83/ghpages@v0.2.1"
+  env = {
+    BUILD_DIR = "dist/"
+  }
+  secrets = ["ACTION_TOKEN"]
+}

+ 11 - 0
.github/issue-reference.workflow

@@ -0,0 +1,11 @@
+workflow "Add an issue reference to a pull request" {
+  on = "pull_request"
+  resolves = "Add an issue reference"
+}
+
+action "Add an issue reference" {
+  uses = "kentaro-m/add-an-issue-reference-action@master"
+  secrets = ["ACTION_TOKEN"]
+  # branch name prefix
+  args = "{\"branch\":\"issue\"}"
+}

+ 2 - 3
.github/workflows/ci.yml

@@ -7,7 +7,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
     strategy:
     strategy:
       matrix:
       matrix:
-        node_version: [8.x, 10.x, 12.x]
+        node_version: [10.x, 12.x]
         os: [ubuntu-latest, windows-latest, macOS-latest]
         os: [ubuntu-latest, windows-latest, macOS-latest]
     steps:
     steps:
       - uses: actions/checkout@v1
       - uses: actions/checkout@v1
@@ -19,10 +19,9 @@ jobs:
       - run: yarn run lint
       - run: yarn run lint
       - run: yarn run tsc
       - run: yarn run tsc
       - run: yarn run build
       - run: yarn run build
-      - run: yarn run test
+      - run: yarn run test:all
         env:
         env:
           CI: true
           CI: true
-          HEADLESS: false
           PROGRESS: none
           PROGRESS: none
           NODE_ENV: test
           NODE_ENV: test
           NODE_OPTIONS: --max_old_space_size=4096
           NODE_OPTIONS: --max_old_space_size=4096

+ 11 - 2
.github/workflows/rebase.yml

@@ -5,10 +5,19 @@ name: Automatic Rebase
 jobs:
 jobs:
   rebase:
   rebase:
     name: Rebase
     name: Rebase
+    if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       - uses: actions/checkout@master
       - uses: actions/checkout@master
+        with:
+          fetch-depth: 0
       - name: Automatic Rebase
       - name: Automatic Rebase
-        uses: cirrus-actions/rebase@master
+        uses: cirrus-actions/rebase@1.2
         env:
         env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
+  always_job:
+    name: Always run job
+    runs-on: ubuntu-latest
+    steps:
+      - name: Always run
+        run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped."

+ 2 - 1
.prettierignore

@@ -17,4 +17,5 @@ LICENSE
 .eslintcache
 .eslintcache
 *.lock
 *.lock
 yarn-error.log
 yarn-error.log
-.history
+.history
+CNAME

+ 4 - 4
azure-pipelines.yml

@@ -16,7 +16,7 @@ jobs:
     steps:
     steps:
       - checkout: self
       - checkout: self
         clean: false
         clean: false
-      - script: npm install
+      - script: yarn
         displayName: install
         displayName: install
       - script: npm run lint
       - script: npm run lint
         displayName: lint
         displayName: lint
@@ -36,7 +36,7 @@ jobs:
       options: '-u root'
       options: '-u root'
 
 
     steps:
     steps:
-      - script: npm install
+      - script: yarn
         displayName: install
         displayName: install
       - script: npm run test:all
       - script: npm run test:all
         env:
         env:
@@ -51,7 +51,7 @@ jobs:
       - task: NodeTool@0
       - task: NodeTool@0
         inputs:
         inputs:
           versionSpec: '11.x'
           versionSpec: '11.x'
-      - script: npm install
+      - script: yarn
         displayName: install
         displayName: install
       - script: npm run lint
       - script: npm run lint
         displayName: lint
         displayName: lint
@@ -74,7 +74,7 @@ jobs:
       - task: NodeTool@0
       - task: NodeTool@0
         inputs:
         inputs:
           versionSpec: '11.x'
           versionSpec: '11.x'
-      - script: npm install
+      - script: yarn
         displayName: install
         displayName: install
       - script: npm run lint
       - script: npm run lint
         displayName: lint
         displayName: lint

+ 1 - 1
package.json

@@ -20,7 +20,7 @@
     "gh-pages": "cp CNAME ./dist/ && gh-pages -d dist",
     "gh-pages": "cp CNAME ./dist/ && gh-pages -d dist",
     "i18n-remove": "pro i18n-remove --locale=zh-CN --write",
     "i18n-remove": "pro i18n-remove --locale=zh-CN --write",
     "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
     "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
-    "lint:prettier": "prettier --check \"**/*\"",
+    "lint:prettier": "prettier --check \"**/*\" --end-of-line auto",
     "lint-staged": "lint-staged",
     "lint-staged": "lint-staged",
     "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
     "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
     "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",
     "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",