wip #342
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
# - 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: 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: | |
DATABASE_URL: postgresql://root@localhost:26257/test?sslmode=disable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hoverkraft-tech/compose-action@v2.0.1 | |
with: | |
services: db | |
compose-file: "docker-compose.ci.yml" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Install dependencies | |
run: npm install | |
- name: Linting | |
if: ${{ always() }} | |
run: npm run lint | |
- name: Check types | |
if: ${{ always() }} | |
run: npm run typecheck | |
- name: Unit tests | |
run: npm run test | |
- 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 | |
- name: Check status again | |
if: ${{ always() }} | |
run: | | |
docker-compose -f docker-compose.ci.yml ps | |
docker-compose -f docker-compose.ci.yml logs | |
- name: Check tables | |
if: ${{ always() }} | |
run: | | |
docker-compose -f docker-compose.ci.yml exec db \ | |
cockroach sql --insecure -d test -e \ | |
"SELECT * FROM information_schema.tables WHERE table_schema = 'public'" | |
- uses: actions/upload-artifact@v4 | |
if: ${{ failure() && steps.e2e.outcome == 'failure' }} | |
with: | |
name: e2e-screenshots | |
path: cypress/screenshots/ |