Skip to content

Commit

Permalink
Disable unit and integration tests in Azure Pipelines
Browse files Browse the repository at this point in the history
Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>
  • Loading branch information
CaptainIRS committed Jun 21, 2022
1 parent 2a3839f commit e0419a0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 122 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish

on:
workflow_run:
workflows: [ "Tests" ]
types:
- completed

jobs:
publish-caliper:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Publish Caliper
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Publish Caliper
run: .build/publish-caliper.sh
123 changes: 1 addition & 122 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,130 +17,9 @@ variables:
value: 14.x

stages:
- stage: UnitTests
displayName: Run unit tests
jobs:
- job: unitTests
displayName: "Base build and unit tests"
strategy:
matrix:
Node14:
NODEVER: 14.x
Node16:
NODEVER: 16.x
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(NODEVER)"
displayName: "Install Node.js"
- script: |
./scripts/check-package-names.sh
displayName: "Check correct usage of Caliper package names"
- script: |
npm install
npm run bootstrap
displayName: "Install project dependencies"
- script: |
./packages/caliper-publish/publish.js version check
displayName: "Check the version consistency of subpackages"
- script: |
npm test
displayName: "Run unit tests"
- stage: IntegrationTests
displayName: Run integration tests
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
dependsOn: UnitTests
jobs:
- job: fabricIntegration
displayName: "Fabric Integration Test"
strategy:
matrix:
Node14:
NODEVER: 14.x
Node16:
NODEVER: 16.x
variables: { BENCHMARK: fabric }
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(NODEVER)"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- job: ethereumIntegration
displayName: "Ethereum Integration Test"
strategy:
matrix:
Node14:
NODEVER: 14.x
Node16:
NODEVER: 16.x
variables: { BENCHMARK: ethereum }
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(NODEVER)"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- job: besuIntegration
displayName: "Besu Integration Test"
strategy:
matrix:
Node14:
NODEVER: 14.x
Node16:
NODEVER: 16.x
variables: { BENCHMARK: besu }
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(NODEVER)"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- job: fiscoIntegration
displayName: "FISCO BCOS Integration Test"
strategy:
matrix:
Node14:
NODEVER: 14.x
Node16:
NODEVER: 16.x
variables: { BENCHMARK: fisco-bcos }
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(NODEVER)"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- job: generatorIntegration
displayName: "Generator Integration Test"
strategy:
matrix:
Node14:
NODEVER: 14.x
Node16:
NODEVER: 16.x
variables: { BENCHMARK: generator }
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(NODEVER)"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- stage: Publish
displayName: Publish Caliper
# having a blind succeeded here will not work if a preceding stage was skipped
condition: and(not(failed('UnitTests')), eq(variables['Build.Reason'], 'IndividualCI'))
condition: eq(variables['Build.Reason'], 'IndividualCI')
jobs:
- job: PublishCaliper
displayName: "Publish Caliper to NPM and DockerHub"
Expand Down

0 comments on commit e0419a0

Please sign in to comment.