add ci workflow

This commit is contained in:
Brian Rosner 2024-05-17 22:33:29 -06:00
parent 774775a80a
commit be7ca948b7

32
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: ci
on:
pull_request:
push:
branches: [main]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: build ci image
uses: docker/build-push-action@v5
with:
context: .
tags: teufa:ci
target: ci
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
- name: run pytest
uses: addnab/docker-run-action@v3
with:
image: teufa:ci
run: pytest