Browse Source

👷 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
pull/6007/head
陈帅 6 years ago
committed by GitHub
parent
commit
f3ab68d5d8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .github/GitHub_Pages_Deploy.workflow
  2. 11
      .github/issue-reference.workflow
  3. 5
      .github/workflows/ci.yml
  4. 13
      .github/workflows/rebase.yml
  5. 1
      .prettierignore
  6. 8
      azure-pipelines.yml
  7. 2
      package.json

7
.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
.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\"}"
}

5
.github/workflows/ci.yml

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

13
.github/workflows/rebase.yml

@ -5,10 +5,19 @@ name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@master
uses: cirrus-actions/rebase@1.2
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."

1
.prettierignore

@ -18,3 +18,4 @@ LICENSE
*.lock
yarn-error.log
.history
CNAME

8
azure-pipelines.yml

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

2
package.json

@ -20,7 +20,7 @@
"gh-pages": "cp CNAME ./dist/ && gh-pages -d dist",
"i18n-remove": "pro i18n-remove --locale=zh-CN --write",
"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:js": "eslint --ext .js,.jsx,.ts,.tsx ",
"lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",

Loading…
Cancel
Save