Skip to content

Commit

Permalink
Add workflow for stage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoIsALie authored Apr 25, 2024
1 parent 5a25063 commit 40ebf77
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/stage-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Dreambuilder stage tests
on:
push:
branches:
- "main"
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create .env file
run: |
mkdir compose/.envs && touch compose/.envs/.env.stage && echo ${{ secrets.STAGE__ENV_DATA}} > compose/.envs/.env.stage
- name: Create client_secret
run: |
touch client_secret.json && echo ${{ secrets.CLIENT_SECRET}} > client_secret.json
- name: Create .env for tests
run: |
touch compose/.envs/.env.test && echo ${{ secrets.STAGE__TEST_ENV}} > compose/.envs/.env.test
- name: Build stack
run: docker-compose -f compose/stage/docker-compose.stage.yml build --no-cache postgres redis auth-api distributions-api deployment-worker
- name: Start stack
run: |
docker-compose -f compose/stage/docker-compose.stage.yml up -d postgres redis
docker-compose -f compose/stage/docker-compose.stage.yml up -d auth-api
docker-compose -f compose/stage/docker-compose.stage.yml up -d distributions-api deployment-worker
- name: Build tests
run: |
docker-compose -f compose/stage/docker-compose.stage.yml up tests

0 comments on commit 40ebf77

Please sign in to comment.