Skip to content

Make image available in docker images #10

Make image available in docker images

Make image available in docker images #10

Workflow file for this run

name: CI
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 15s
- name: Run integration tests
run: |
cp .env.example .env.test
make test
- name: Stop database servers
run: docker-compose down