Increase sleep time to 10s #16
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: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
env: | |
REGISTRY_IMAGE: laudio/pyodbc:test | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- linux/amd64 | |
- linux/arm64 | |
steps: | |
- name: Prepare | |
run: | | |
platform=${{ matrix.platform }} | |
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY_IMAGE }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image | |
id: build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
target: test | |
platforms: ${{ matrix.platform }} | |
labels: ${{ steps.meta.outputs.labels }} | |
outputs: type=docker,name=${{ env.REGISTRY_IMAGE }},name-canonical=true,push=false | |
- name: Start database servers | |
run: | | |
docker-compose up -d | |
sleep 10s | |
- name: Run integration tests | |
run: | | |
cp .env.example .env.test | |
make test | |
- name: Stop database servers | |
run: docker-compose down |