Skip to content

Commit

Permalink
test: remove azure ui test and try test pr github action (ant-design#…
Browse files Browse the repository at this point in the history
…27458)

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

* fix pr if
  • Loading branch information
shaodahong authored Oct 30, 2020
1 parent 39e37bf commit dbca238
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
37 changes: 1 addition & 36 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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'

0 comments on commit dbca238

Please sign in to comment.