Wait for db to be ready #4
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: Docker Testing | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build container for tests | |
run: docker compose build | |
- name: Start local database database | |
run: docker compose up -d db | |
- name: Run tests | |
run: docker compose run test | |
- name: Clean up Docker Compose | |
if: always() | |
run: docker compose down | |