Skip to content

Create revision history entries for secret-changes via API #169

Create revision history entries for secret-changes via API

Create revision history entries for secret-changes via API #169

Workflow file for this run

name: Run Django Tests on PR
on:
pull_request:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set Up uv
uses: astral-sh/setup-uv@v8.1.0 # immutable
- name: Set up just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
- name: Run Ruff format check
run: just check-format
- name: Run Ruff
run: just check-lint
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build frontend
run: bun run build
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# based on django version in dependencies - minus 3.10 & 3.11 because of typing support
python-version: ["3.12", "3.13", "3.14"]
env:
TEAMVAULT_CONFIG_FILE: ${{ github.workspace }}/teamvault.cfg
DATABASE_URL: postgres://postgres:postgres@localhost:5432/teamvault
PGPORT: 5432
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: teamvault
POSTGRES_USER: teamvault
POSTGRES_PASSWORD: teamvault
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install system build deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
libldap2-dev \
libpq-dev \
libsasl2-dev \
postgresql-contrib
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Set Up uv
uses: astral-sh/setup-uv@v8.1.0 # immutable
with:
enable-cache: true
cache-dependency-glob: |
**/uv.lock
**/pyproject.toml
- name: Set up just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
- name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Cache venv
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
.venv
key: uv-venv-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/uv.lock', '**/pyproject.toml') }}
restore-keys: |
uv-venv-${{ runner.os }}-py${{ matrix.python-version }}-
- name: Install dependencies
working-directory: ${{ github.workspace }}
run: uv sync
- name: Activate venv for later steps
shell: bash
run: echo "${{ github.workspace }}/.venv/bin" >> "$GITHUB_PATH"
- name: Build frontend bundle
working-directory: ${{ github.workspace }}
run: |
bun install --frozen-lockfile
bun run build
- name: Install Playwright browsers
working-directory: ${{ github.workspace }}
run: uv run playwright install --with-deps chromium --no-shell
- name: Set Up TeamVault Config File
working-directory: ${{ github.workspace }}
run: teamvault setup
- name: Run Tests
working-directory: ${{ github.workspace }}
run: just test