mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: setup github action e2e job
This commit is contained in:
1 parent
b305cd92b9
commit
f794e8f112
2 files changed
+36
-1
No files matched your search
@@ -24,8 +24,31 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: yarn 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:
|
build-and-push:
|
||||||
needs: ci
|
needs:
|
||||||
|
- ci
|
||||||
|
- e2e
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,18 @@ services:
|
|||||||
- MONGO_PASS=user-password
|
- MONGO_PASS=user-password
|
||||||
- MONGO_DB=odyssey-test
|
- 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:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
players:
|
players:
|
||||||
|
|||||||
Reference in new issue
Block a user