Skip to content

Add CI tests for Python 3.8, 3.11 #61

Add CI tests for Python 3.8, 3.11

Add CI tests for Python 3.8, 3.11 #61

name: docker - Build, Lint, and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-lint-test:
runs-on: ubuntu-latest
env:
IMAGE_TAG: ${{ github.sha }}
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- uses: jpribyl/action-docker-layer-caching@v0.1.0
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Build and install
run: docker build --load -t precovery:$IMAGE_TAG .
- name: Lint
run: docker run -i precovery:$IMAGE_TAG pre-commit run --all-files
- name: Test
run: docker run -i precovery:$IMAGE_TAG pytest . --cov