Skip to content

Update branch on Github workflow #1

Update branch on Github workflow

Update branch on Github workflow #1

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and run docker-compose
run: docker-compose up -d --build
- name: Wait for services to be healthy
run: |
while ! docker-compose exec api curl -sSf http://localhost:5000/health; do
echo "Waiting for API to be healthy..."
sleep 5
done
- name: Run tests
run: docker-compose exec api dotnet test ./tests
- name: Tear down Docker containers
run: docker-compose down