test: remove azure ui test and try test pr github action (#27458)

* test: remove azure ui test and try test pr github action

* fix pr if
This commit is contained in:
骗你是小猫咪 2020-10-30 15:29:23 +08:00 committed by GitHub
parent 39e37bf1b4
commit dbca2381df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 37 deletions

View File

@ -16,4 +16,9 @@ jobs:
run: npm run test-image
- name: argos-ci
run: npm run argos -- --token ${{ secrets.ARGOS_TOKEN }} --branch ${GITHUB_REF##*/} --commit ${GITHUB_SHA}
if: github.event_name == 'pull_request_target'
run: npm run argos -- --token ${{ secrets.ARGOS_TOKEN }} --branch pull/${{ github.event.pull_request.number }}/merge --commit ${{ github.event.pull_request.head.sha }}
- name: argos-ci
if: github.event_name == 'push'
run: npm run argos -- --token ${{ secrets.ARGOS_TOKEN }} --branch ${GITHUB_REF##*/} --commit ${{ github.sha }}

View File

@ -1,12 +1,7 @@
name: Ant Design
trigger:
branches:
include:
- master
- feature
trigger: none
# https://developercommunity.visualstudio.com/comments/949241/view.html
pr:
autoCancel: true
branches:
@ -65,33 +60,3 @@ stages:
- script: |
node ./scripts/azure-github-comment.js "[<img width="534" src="https://user-images.githubusercontent.com/5378891/75333447-1e63a280-58c1-11ea-975d-235367fd1522.png">](https://dev.azure.com/ant-design/ant-design/_build/results?buildId=$(Build.BuildId))"
displayName: 'Comment on github'
- stage: ui
variables:
ARGOSTOKEN: $(ARGOS_TOKEN)
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
commitId: $(Build.SourceVersion)
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: $[ replace(variables['Build.SourceBranch'], 'refs/', '') ]
commitId: $(System.PullRequest.SourceCommitId)
dependsOn: []
jobs:
- job: UI_Test
steps:
- script: |
echo $(commitId)
- checkout: self
displayName: 'Checkout'
clean: true
fetchDepth: 1
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '14.7.0'
- script: npm install
displayName: 'Install modules'
- script: npm run test-image
displayName: 'UI Test'
- script: npm run argos -- --token $(ARGOSTOKEN) --branch $(branchName) --commit $(commitId)
displayName: 'Upload to argos-ci'