Reduce container size

This commit is contained in:
phil 2024-11-03 02:33:57 +01:00
parent 21bd7a904f
commit c783be5155
2 changed files with 37 additions and 0 deletions

View file

@ -1,2 +1,5 @@
.venv
.git
dist
.pytest_cache
.forgejo

View file

@ -0,0 +1,34 @@
on:
push:
workflow_dispatch:
inputs:
verbose:
description: "Verbose"
required: false
default: false
type: boolean
jobs:
test:
runs-on: container
container:
image: tiptop:5000/treetrail-backend-ci
volumes:
- "uv_cache:/root/.cache/uv"
- "ca-cert:/etc/containers/certs.d"
services:
treetrail-database:
image: treetrail-database
steps:
- name: Echo env
if: ${{ inputs.verbose }}
run: |
echo '${{ toJSON(env) }}'
- uses: actions/checkout@v4
- name: Install app with 'uv pip install'
run: uv pip install --python=$UV_PROJECT_ENVIRONMENT --no-deps .
- name: Run tests (API call)
run: pytest -s tests/basic.py