Browse Source

test: fix ui test base trigger (#27380)

* test: ui test with github action

* remove site dependOn

* use job

* reset yaml
pull/27409/head
骗你是小猫咪 4 years ago
committed by GitHub
parent
commit
2636aac9ca
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Dockerfile.ui-test
  2. 12
      azure-pipelines.yml
  3. 1
      docker-compose.yml

1
Dockerfile.ui-test

@ -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
azure-pipelines.yml

@ -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'

1
docker-compose.yml

@ -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…
Cancel
Save