Skip to content

Commit

Permalink
test: fix ui test base trigger (ant-design#27380)
Browse files Browse the repository at this point in the history
* test: ui test with github action

* remove site dependOn

* use job

* reset yaml
  • Loading branch information
shaodahong authored Oct 27, 2020
1 parent a91c2f9 commit 2636aac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion Dockerfile.ui-test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ FROM buildkite/puppeteer:v3.0.4
RUN mkdir /app
WORKDIR /app
COPY package.json ./
RUN npm install
ENV PATH="${PATH}:/app/node_modules/.bin"
COPY . .
12 changes: 9 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Ant Design

trigger: none

pr:
autoCancel: true
branches:
Expand All @@ -13,6 +11,7 @@ pool:

stages:
- stage: site
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
jobs:
- job: Build_Site
steps:
Expand Down Expand Up @@ -59,8 +58,15 @@ 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:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: $[ replace(variables['System.PullRequest.SourceBranch'], 'refs/heads/', '') ]
dependsOn: []
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
jobs:
- job: UI_Test
steps:
Expand All @@ -76,5 +82,5 @@ stages:
displayName: 'Install modules'
- script: npm run test-image
displayName: 'UI Test'
- script: npm run argos -- --token $ARGOS_TOKEN --branch $(Build.SourceBranch) --commit $(Build.SourceVersion)
- script: npm run argos -- --token $ARGOS_TOKEN --branch $(branchName) --commit $(Build.SourceVersion)
displayName: 'Upload to argos-ci'
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
context: .
dockerfile: Dockerfile.ui-test
volumes:
- './node_modules:/app/node_modules'
- './components:/app/components'
- './tests:/app/tests'
- './jest-stare:/app/jest-stare'
Expand Down

0 comments on commit 2636aac

Please sign in to comment.