|
@@ -1,130 +0,0 @@
|
|
|
-name: run-network-tests-branch
|
|
|
-on:
|
|
|
- push:
|
|
|
- workflow_dispatch:
|
|
|
-
|
|
|
-jobs:
|
|
|
- prepare_docker_images:
|
|
|
- name: Build new images
|
|
|
- runs-on: ubuntu-latest
|
|
|
- outputs:
|
|
|
- joystream_node_tag: ${{ steps.docker_build.outputs.tag }}
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v1
|
|
|
- - name: Login to DockerHub
|
|
|
- uses: docker/login-action@v1
|
|
|
- with:
|
|
|
- username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
- password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
-
|
|
|
- - id: compute_shasum
|
|
|
- name: Compute runtime code shasum
|
|
|
- run: |
|
|
|
- export RUNTIME_CODE_SHASUM=`scripts/runtime-code-shasum.sh`
|
|
|
- echo "::set-output name=shasum::${RUNTIME_CODE_SHASUM}"
|
|
|
-
|
|
|
- - name: Setup cache directory
|
|
|
- run: mkdir ~/docker-images
|
|
|
-
|
|
|
- - name: Docker images cache
|
|
|
- uses: actions/cache@v2
|
|
|
- env:
|
|
|
- cache-name: joystream-node-docker
|
|
|
- with:
|
|
|
- path: ~/docker-images
|
|
|
- key: ${{ env.cache-name }}-${{ steps.compute_shasum.outputs.shasum }}
|
|
|
-
|
|
|
- - id: docker_build
|
|
|
- name: Build and publish docker images
|
|
|
- env:
|
|
|
- RUNTIME_CODE_SHASUM: ${{ steps.compute_shasum.outputs.shasum }}
|
|
|
- run: |
|
|
|
- function docker_tag_exists() {
|
|
|
- curl --silent -f -lSL https://index.docker.io/v1/repositories/joystream/node/tags/$1 > /dev/null
|
|
|
- }
|
|
|
-
|
|
|
- if docker_tag_exists ${{ env.RUNTIME_CODE_SHASUM }}; then
|
|
|
- export JOYSTREAM_NODE_TAG=${{ env.RUNTIME_CODE_SHASUM }}
|
|
|
- docker pull joystream/node:${JOYSTREAM_NODE_TAG}
|
|
|
- docker image tag joystream/node:${JOYSTREAM_NODE_TAG} joystream/node:latest
|
|
|
- else
|
|
|
- export JOYSTREAM_NODE_TAG=latest
|
|
|
- docker-compose build
|
|
|
- docker image tag joystream/node joystream/node:${{ env.RUNTIME_CODE_SHASUM }}
|
|
|
- docker push joystream/node:${{ env.RUNTIME_CODE_SHASUM }}
|
|
|
- fi
|
|
|
-
|
|
|
- # update cache
|
|
|
- docker save --output joystream-node-docker-image.tar joystream/node:latest
|
|
|
- gzip joystream-node-docker-image.tar
|
|
|
- cp joystream-node-docker-image.tar.gz ~/docker-images/
|
|
|
-
|
|
|
- echo "::set-output name=tag::${{ env.RUNTIME_CODE_SHASUM }}"
|
|
|
-
|
|
|
- run_network_tests_1:
|
|
|
- name: Network Integration Runtime Tests
|
|
|
- needs: prepare_docker_images
|
|
|
- runs-on: ubuntu-latest
|
|
|
- env:
|
|
|
- JOYSTREAM_NODE_TAG: ${{ needs.prepare_docker_images.outputs.joystream_node_tag }}
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v1
|
|
|
- - uses: actions/setup-node@v1
|
|
|
- with:
|
|
|
- node-version: '12.x'
|
|
|
- - name: Install packages and dependencies
|
|
|
- run: yarn install --frozen-lockfile
|
|
|
- - name: Ensure tests are runnable
|
|
|
- run: yarn workspace network-tests build
|
|
|
- - name: Pull joystream/node image from Dockerhub
|
|
|
- run: docker-compose pull
|
|
|
- - name: Start chain
|
|
|
- run: docker-compose up -d
|
|
|
- - name: Execute network tests
|
|
|
- run: yarn workspace network-tests test
|
|
|
-
|
|
|
- run_network_tests_2:
|
|
|
- name: Query Node Tests (Placeholder)
|
|
|
- needs: prepare_docker_images
|
|
|
- runs-on: ubuntu-latest
|
|
|
- env:
|
|
|
- JOYSTREAM_NODE_TAG: ${{ needs.prepare_docker_images.outputs.joystream_node_tag }}
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v1
|
|
|
- - uses: actions/setup-node@v1
|
|
|
- with:
|
|
|
- node-version: '12.x'
|
|
|
- - name: Install packages and dependencies
|
|
|
- run: yarn install --frozen-lockfile
|
|
|
- - name: Ensure tests are runnable
|
|
|
- run: yarn workspace network-tests build
|
|
|
- - name: Pull joystream/node image from Dockerhub
|
|
|
- run: docker-compose pull
|
|
|
- - name: Start chain
|
|
|
- run: docker-compose up -d
|
|
|
- # - name: Execute network tests
|
|
|
- # run: yarn workspace network-tests test
|
|
|
-
|
|
|
- run_network_tests_3:
|
|
|
- name: Storage Node Tests
|
|
|
- needs: prepare_docker_images
|
|
|
- runs-on: ubuntu-latest
|
|
|
- env:
|
|
|
- JOYSTREAM_NODE_TAG: ${{ needs.prepare_docker_images.outputs.joystream_node_tag }}
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v1
|
|
|
- - uses: actions/setup-node@v1
|
|
|
- with:
|
|
|
- node-version: '12.x'
|
|
|
- - name: Install packages and dependencies
|
|
|
- run: |
|
|
|
- yarn install --frozen-lockfile
|
|
|
- yarn workspace storage-node build
|
|
|
- - name: Build storage node
|
|
|
- run: yarn workspace storage-node build
|
|
|
- - name: Pull joystream/node image from Dockerhub
|
|
|
- run: docker-compose pull
|
|
|
- - name: Start chain
|
|
|
- run: docker-compose up -d
|
|
|
- - name: Execute tests
|
|
|
- run: DEBUG=* yarn storage-cli dev-init
|