2021-02-01 06:08:16 +01:00
|
|
|
name: e2e
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2021-06-30 09:20:39 +02:00
|
|
|
run-e2e-test:
|
2021-02-01 06:08:16 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: set up docker
|
|
|
|
uses: docker-practice/actions-setup-docker@0.0.1
|
|
|
|
with:
|
|
|
|
docker_version: 18.09
|
|
|
|
docker_channel: stable
|
|
|
|
|
|
|
|
- name: checkout distribution
|
|
|
|
uses: actions/checkout@master
|
|
|
|
with:
|
|
|
|
path: main
|
|
|
|
|
|
|
|
- name: start distribution server
|
|
|
|
run: |
|
|
|
|
IP=`hostname -I | awk '{print $1}'`
|
|
|
|
echo "IP=$IP" >> $GITHUB_ENV
|
|
|
|
echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json
|
|
|
|
sudo service docker restart
|
|
|
|
DISTRIBUTION_REF="local-distribution:v$(date +%Y%m%d%H%M%S)"
|
|
|
|
cd ./main
|
|
|
|
docker build -f ./Dockerfile -t "${DISTRIBUTION_REF}" .
|
|
|
|
docker run --rm -p 5000:5000 -p 5001:5001 -idt "${DISTRIBUTION_REF}"
|
|
|
|
|
|
|
|
- name: script
|
|
|
|
run: |
|
2021-06-30 09:20:39 +02:00
|
|
|
bash ./main/tests/push.sh $IP
|