12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- name: run-network-tests-privileged
- 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
- 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
|