diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a40d1ea3..3b9df93f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,19 +13,27 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 + - name: docker setup uses: docker-practice/actions-setup-docker@master + - name: docker network setup run: docker network create e2e-net + - name: run dbms run: docker run --rm -it --name database --network e2e-net -e MYSQL_ROOT_PASSWORD=0000 -e MYSQL_DATABASE=luffy -d mysql:8.0.33 + - name: build nalab-server run: ./gradlew clean build + - name: build nalab-server-docker-image run: docker build --tag luffy:e2e --build-arg DB_URL=jdbc:mysql://database:3306/luffy --build-arg DB_USERNAME=root --build-arg DB_PASSWORD=0000 --build-arg JWT_SECRET=fore2e . + - name: run nalab-server run: docker run --rm -it --name nalab-server --network e2e-net -d luffy:e2e + - name: build hurl image run: docker build --tag hurl:e2e support/e2e/ + - name: e2e test run: docker run --rm --network e2e-net hurl:e2e diff --git a/support/e2e/Dockerfile b/support/e2e/Dockerfile index b6969b14..c7c2d65d 100644 --- a/support/e2e/Dockerfile +++ b/support/e2e/Dockerfile @@ -10,7 +10,7 @@ RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSI RUN apt-get install -y curl -RUN curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/3.0.1/hurl_3.0.1_amd64.deb -RUN apt-get update && apt-get install -y ./hurl_3.0.1_amd64.deb +RUN curl -k --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl_4.0.0_amd64.deb +RUN apt-get update && apt-get install -y ./hurl_4.0.0_amd64.deb ENTRYPOINT dockerize -wait tcp://nalab-server:8080 -timeout 300s && hurl --very-verbose --color --test hurls/*.hurl