-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (38 loc) · 1.68 KB
/
system_run_docker_image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Build a local testnet and checks you can run tests from the e2e docker container
#
name: '[system] Check docker image'
run-name: Check docker image (${{ github.event_name }})
on:
schedule:
- cron: '10 4 * * *'
workflow_dispatch:
jobs:
test-run:
runs-on: [self-hosted, Linux, X64, ten-test-gh-runner-01]
steps:
- name: 'Check out go-ten code'
uses: actions/checkout@v3
with:
repository: ten-protocol/go-ten
path: ./go-ten
- name: 'Docker clean containers and images before the test'
run: |
for i in `docker ps -a | awk '{ print $1 } ' | grep -v CONTAINER`; do docker stop $i && docker rm $i; done
docker system prune -af --volumes
for i in `docker volume ls --filter dangling=true -q`; do docker volume rm $i; done
- name: 'Build and start up testnet'
run: |
cd ${{ github.workspace }}/go-ten/testnet
./testnet-local-build_images.sh
cd ${{ github.workspace }}/go-ten/
go run ./testnet/launcher/cmd
- name: 'Run tests on workflow dispatch'
run: |
cd ${{ github.workspace }}/ten-test
docker run -e DOCKER_TEST_ENV=true --network=node_network --name=e2e-tests testnetobscuronet.azurecr.io/obscuronet/obscuro_test:latest /usr/local/bin/pysys.py run -m ten.local -i sanity
- name: 'Docker clean containers and images after the test'
if: always()
run: |
for i in `docker ps -a | awk '{ print $1 } ' | grep -v CONTAINER`; do docker stop $i && docker rm $i; done
docker system prune -af --volumes
for i in `docker volume ls --filter dangling=true -q`; do docker volume rm $i; done