diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml new file mode 100644 index 0000000..926bd82 --- /dev/null +++ b/.forgejo/workflows/test.yaml @@ -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: code.philo.ydns.eu/philorg/gisaf-backend-ci + volumes: + - "uv_cache:/root/.cache/uv" + - "ca-cert:/etc/containers/certs.d" + services: + gisaf-database: + image: code.philo.ydns.eu/philorg/gisaf-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: GISAF_DB_HOST=gisaf-database pytest -s tests/basic.py