123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- name: run-network-tests
- on:
- pull_request:
- types: [labeled, synchronize]
- workflow_dispatch:
- jobs:
- run_network_tests:
- name: Network Integration Tests
- if: contains(github.event.pull_request.labels.*.name, 'run-network-tests') || github.event.action == null
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v1
- - uses: actions/setup-node@v1
- with:
- node-version: '12.x'
- - uses: technote-space/get-diff-action@v3
- with:
- PREFIX_FILTER: |
- node
- runtime-modules
- utils/chain-spec-builder
- SUFFIX_FILTER: |
- .rs
- FILES: |
- Cargo.lock
- Cargo.toml
- - name: Install packages and dependencies
- run: yarn install --frozen-lockfile
- - name: Ensure tests are runnable
- run: yarn workspace network-tests build
- - name: Maybe fetch pre-built joystream/node Docker image
- run: |
- # Always configure faster block production incase pull fails
- # and we will build from source.
- ./scripts/alter-block-creation-time.sh
- export JOYSTREAM_NODE_TAG="${{ pull.base.ref }}"
- echo "DEBUG: JOYSTREAM_NODE_TAG = ${JOYSTREAM_NODE_TAG}"
- if [ "${{ env.GIT_DIFF }}" ]
- then
- echo "joystream-node source modified. Will build from source."
- else
- # Try to get image tagged with base branch name. If it fails we continue anyway,
- # docker-compose will then bulid from srouce when it doesn't find the image.
- echo "joystream-node source not modified. Will try to use pre-built image"
- docker pull joystream/node:${JOYSTREAM_NODE_TAG}
- fi
- - name: Start chain
- run: JOYSTREAM_NODE_TAG=${{ pull.base.ref }} docker-compose up -d
- - name: Execute network tests
- run: yarn workspace network-tests test
|