Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cfranklin11 committed Jul 16, 2024
1 parent c7b465c commit b0946e5
Showing 1 changed file with 34 additions and 30 deletions.
64 changes: 34 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,42 @@ name: build
on: push

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "docker-compose.ci.yml"
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: hoverkraft-tech/compose-action@v2.0.1
# with:
# compose-file: "docker-compose.ci.yml"

- name: Check client types
run: docker-compose -f docker-compose.ci.yml exec -T client yarn run typecheck
- name: Lint client Typescript files
run: docker-compose -f docker-compose.ci.yml exec -T client yarn run lint
# - name: Check client types
# run: docker-compose -f docker-compose.ci.yml exec -T client yarn run typecheck
# - name: Lint client Typescript files
# run: docker-compose -f docker-compose.ci.yml exec -T client yarn run lint

- name: Check server types
run: docker-compose -f docker-compose.ci.yml exec -T server yarn run typecheck
- name: Lint server Typescript files
run: docker-compose -f docker-compose.ci.yml exec -T server yarn run lint
# - name: Check server types
# run: docker-compose -f docker-compose.ci.yml exec -T server yarn run typecheck
# - name: Lint server Typescript files
# run: docker-compose -f docker-compose.ci.yml exec -T server yarn run lint

- name: Run server unit tests
run: docker-compose -f docker-compose.ci.yml exec -T server yarn run test:unit
- name: Run client unit tests
run: docker-compose -f docker-compose.ci.yml exec -T client yarn run test --watchAll=false
- name: Run server integration tests
run: ./scripts/integration_tests.sh
- name: Run browser end to end tests for client app
id: e2e
run: ./scripts/browser_tests.sh
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.e2e.outcome == 'failure' }}
with:
name: e2e-screenshots
path: browser_test/cypress/screenshots/
# - name: Run server unit tests
# run: docker-compose -f docker-compose.ci.yml exec -T server yarn run test:unit
# - name: Run client unit tests
# run: docker-compose -f docker-compose.ci.yml exec -T client yarn run test --watchAll=false
# - name: Run server integration tests
# run: ./scripts/integration_tests.sh
# - name: Run browser end to end tests for client app
# id: e2e
# run: ./scripts/browser_tests.sh
# - uses: actions/upload-artifact@v4
# if: ${{ failure() && steps.e2e.outcome == 'failure' }}
# with:
# name: e2e-screenshots
# path: browser_test/cypress/screenshots/

next:
runs-on: ubuntu-latest
env:
DB_NAME: test
DATABASE_URL: postgresql://root@localhost:26257/test?sslmode=disable
steps:
- uses: actions/checkout@v4
Expand All @@ -58,6 +57,11 @@ jobs:
with:
services: db
compose-file: "docker-compose.ci.yml"
- name: Check status
run: |
docker-compose -f docker-compose.ci.yml ps
docker-compose -f docker-compose.ci.yml logs
- name: Run e2e tests
id: e2e
run: npm run test:ci
Expand Down

0 comments on commit b0946e5

Please sign in to comment.