mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 19:42:54 +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
|
RUN mkdir /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm install
|
|
||||||
ENV PATH="${PATH}:/app/node_modules/.bin"
|
ENV PATH="${PATH}:/app/node_modules/.bin"
|
||||||
COPY . .
|
COPY . .
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
name: Ant Design
|
name: Ant Design
|
||||||
|
|
||||||
trigger: none
|
|
||||||
|
|
||||||
pr:
|
pr:
|
||||||
autoCancel: true
|
autoCancel: true
|
||||||
branches:
|
branches:
|
||||||
@ -13,6 +11,7 @@ pool:
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: site
|
- stage: site
|
||||||
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
|
||||||
jobs:
|
jobs:
|
||||||
- job: Build_Site
|
- job: Build_Site
|
||||||
steps:
|
steps:
|
||||||
@ -59,8 +58,15 @@ stages:
|
|||||||
- script: |
|
- 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))"
|
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'
|
displayName: 'Comment on github'
|
||||||
|
|
||||||
- stage: ui
|
- 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: []
|
dependsOn: []
|
||||||
|
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
|
||||||
jobs:
|
jobs:
|
||||||
- job: UI_Test
|
- job: UI_Test
|
||||||
steps:
|
steps:
|
||||||
@ -76,5 +82,5 @@ stages:
|
|||||||
displayName: 'Install modules'
|
displayName: 'Install modules'
|
||||||
- script: npm run test-image
|
- script: npm run test-image
|
||||||
displayName: 'UI Test'
|
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'
|
displayName: 'Upload to argos-ci'
|
||||||
|
@ -5,6 +5,7 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.ui-test
|
dockerfile: Dockerfile.ui-test
|
||||||
volumes:
|
volumes:
|
||||||
|
- './node_modules:/app/node_modules'
|
||||||
- './components:/app/components'
|
- './components:/app/components'
|
||||||
- './tests:/app/tests'
|
- './tests:/app/tests'
|
||||||
- './jest-stare:/app/jest-stare'
|
- './jest-stare:/app/jest-stare'
|
||||||
|
Loading…
Reference in New Issue
Block a user