feat: setup github action e2e job

This commit is contained in:
Lin, Hung-Shin committed 2023-09-28 13:54:36 +08:00
1 parent b305cd92b9
commit f794e8f112
2 files changed
+36 -1

No files matched your search

+24 -1
View File
@@ -24,8 +24,31 @@ jobs:
- name: Test
run: yarn test
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Pull Test Environment Images
run: docker-compose -f docker-compose.testing.yml pull db-test
- name: Build Test Environment, Stage 1
run: docker-compose -f docker-compose.testing.yml build base backend app-test
- name: Build Test Environment, Stage 2
run: docker-compose -f docker-compose.testing.yml build helloworld
- name: Run Cypress Tests
run: docker-compose -f docker-compose.testing.yml run cypress
- name: Tear Down Test Environment
run: docker-compose -f docker-compose.testing.yml down
build-and-push:
needs: ci
needs:
- ci
- e2e
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
+12
View File
@@ -53,6 +53,18 @@ services:
- MONGO_PASS=user-password
- MONGO_DB=odyssey-test
base:
image: lancatlin/linux-odyssey:base
build:
context: .
dockerfile: ./quests/Dockerfile
helloworld:
image: lancatlin/linux-odyssey:helloworld
build:
context: .
dockerfile: quests/helloworld/Dockerfile
networks:
internal:
players: