123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- 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 }}
- # TODO: Try to not build a new image: compute a hash over rust code and use that as the docker
- # image tag. (Normally this would be the git repo commit hash but the monorepo contains multiple projects
- # that is why it is not effective.)
- - id: docker_build
- name: Build and publish docker images
- run: |
- docker-compose build
- export JOYSTREAM_NODE_TAG=`docker run joystream/node --version | sed -e 's/^joystream-node //' | tr -d '\n' | tr -d '\r'`
- docker image tag joystream/node joystream/node:${JOYSTREAM_NODE_TAG}
- docker push joystream/node:${JOYSTREAM_NODE_TAG}
- echo "::set-output name=tag::${JOYSTREAM_NODE_TAG}"
- 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
- # These tests will fail because storage-node has not been updated for latest rutnime types
- # for babylon
- 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
|