Skip to content
Open

Tests #163

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: tests

on:
push:
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
container: ghcr.io/astral-sh/uv:python3.14-trixie
steps:
- uses: actions/checkout@v4
- run: ./hooks/test.sh
Comment on lines +8 to +13
2 changes: 0 additions & 2 deletions .gitlab-ci.yml

This file was deleted.

19 changes: 19 additions & 0 deletions hooks/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euxvo pipefail

TEMPLATE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT

cd "$TMP_DIR"
uvx cookiecutter "$TEMPLATE_DIR" --no-input

PROJECT_DIR="$TMP_DIR/my_project"
cd "$PROJECT_DIR"

uv venv .venv
uv pip install --python .venv/bin/python -r requirements/dev.in

DATABASE_URL="sqlite:///db.sqlite3" .venv/bin/python manage.py check

echo "Cookiecutter generated project in $TMP_DIR passed Django checks"
Loading