This repository has been archived by the owner on Jan 7, 2025. It is now read-only.
pyproject: update ansible to 10.3.0 and python to 3.10 #22
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
POETRY_VERSION: "1.8.3" | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
# TODO: 'python:3.12.4-bullseye' | |
# only release for pypy as it's faster anyway | |
baseimage: ['pypy:3.10-7-slim-bookworm'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Cache Docker layers | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.docker-cache | |
key: ${{ runner.os }}-buildx-${{ hashFiles('./Dockerfile') }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- uses: docker/build-push-action@v5.1.0 | |
with: | |
context: . | |
tags: intel/vmsifter:latest | |
target: vmsifter-dev | |
build-args: | | |
BASEIMAGE=${{ matrix.baseimage }} | |
BUILD_ID=-ci-${{ github.run_id }} | |
load: false | |
# disable push for now. | |
push: false | |
cache-from: type=local,src=/tmp/.docker-cache | |
cache-to: type=local,dest=/tmp/.docker-cache,mode=max | |
# - name: cleanup build | |
# if: always() | |
# run: | | |
# docker rmi -f vmsifter-dev-ci-${{ github.run_id }} vmsifter-ci-${{ github.run_id }} | |
# # cleanup intermediate images as well, filtering by BUILD_ID | |
# docker image prune --filter label=build=-ci-${{ github.run_id }} | |
check: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
task: [format_check, lint, typing, unit_test] | |
steps: | |
# tmp fix for https://github.com/actions/runner/issues/434 | |
- name: Cleanup | |
run: sudo find . -mindepth 1 -delete | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install Poetry | |
run: pip install poetry==${{ env.POETRY_VERSION }} | |
- name: ${{ matrix.task }} | |
run: | | |
poetry install | |
poetry run poe ${{ matrix.task }} |