Version 0.56.0 #1272
This file contains hidden or 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: Test The Application | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| branches: | |
| - main | |
| - dev | |
| jobs: | |
| test_API: | |
| runs-on: [self-hosted, linux] | |
| # Permissions reduced since we are no longer posting comments/checks | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| package-manager-cache: false | |
| - name: Install yarn | |
| run: npm install -g yarn | |
| - name: install dependencies | |
| run: yarn install --immutable | |
| - name: build_stack | |
| run: docker compose -f docker-compose.testing.yml build | |
| - name: clear previous volumes | |
| run: docker compose -f docker-compose.testing.yml down -v | |
| - name: launch_stack | |
| working-directory: ./backend | |
| run: | | |
| docker compose -f ../docker-compose.testing.yml up -d | |
| SECONDS=0 | |
| TIMEOUT=180 | |
| while [ ! -f ./.endpoints/__generated__endpoints.json ]; do | |
| if [ $SECONDS -ge $TIMEOUT ]; then | |
| echo "Timeout reached: __generated__endpoints.json not found" | |
| docker compose -f ../docker-compose.testing.yml down | |
| exit 1 | |
| fi | |
| sleep 1 | |
| echo "waiting for endpoints" | |
| done | |
| echo "Endpoints found. Running tests..." | |
| # This will now cause the step to fail immediately if tests fail. | |
| yarn test --ci | |
| echo "Tests passed successfully." | |
| - name: Clean up | |
| if: always() | |
| run: npm uninstall -g yarn | |
| - name: Stop Docker stack | |
| if: always() | |
| run: docker compose -f docker-compose.testing.yml down | |
| - name: Delete Docker volumes | |
| if: always() | |
| run: docker volume prune -f |