mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
test: fix ui test base trigger (#27380)
* test: ui test with github action * remove site dependOn * use job * reset yaml
This commit is contained in:
parent
a91c2f9cd8
commit
2636aac9ca
@ -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 . .
|
||||
|
@ -1,7 +1,5 @@
|
||||
name: Ant Design
|
||||
|
||||
trigger: none
|
||||
|
||||
pr:
|
||||
autoCancel: true
|
||||
branches:
|
||||
@ -13,6 +11,7 @@ pool:
|
||||
|
||||
stages:
|
||||
- stage: site
|
||||
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
|
||||
jobs:
|
||||
- job: Build_Site
|
||||
steps:
|
||||
@ -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:
|
||||
@ -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'
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user