37 lines
950 B
YAML
37 lines
950 B
YAML
name: Test CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-22.04
|
|
container:
|
|
image: ghcr.io/mxmehl/python-tests-image:3.12
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Hash poetry.lock
|
|
id: hash
|
|
run: |
|
|
echo "poetry_hash=$(md5sum poetry.lock | cut -c -32)" >> $GITHUB_OUTPUT
|
|
- run: echo "${{ steps.hash.outputs.poetry_hash }}"
|
|
- name: Cache poetry
|
|
uses: https://github.com/actions/cache@v3 # Action cache
|
|
with: # specify with your GOMODCACHE and GOCACHE
|
|
path: |-
|
|
/root/.cache/pypoetry/virtualenvs
|
|
key: poetry_cache-${{ steps.hash.outputs.poetry_hash }}
|
|
restore-keys: |-
|
|
poetry_cache-${{ steps.hash.outputs.poetry_hash }}
|
|
- run: poetry install --verbose
|
|
|
|
# test2:
|
|
# runs-on: ubuntu-24.04
|
|
# steps:
|
|
# - run: pwd
|
|
# - run: whoami
|