From dbca2381df279dc45fab3f6b226d9967c3658c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=97=E4=BD=A0=E6=98=AF=E5=B0=8F=E7=8C=AB=E5=92=AA?= Date: Fri, 30 Oct 2020 15:29:23 +0800 Subject: [PATCH] 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 --- .github/workflows/ui.yml | 7 ++++++- azure-pipelines.yml | 37 +------------------------------------ 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index 194f18177e..4749503673 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -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 }} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c0dead5a50..f28a1a6a00 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 "[](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'