~linuxgoose/bocpress

ref: 7aed0b0bd7c12e24d98cc947655f01325566f967 bocpress/.github/workflows/check.yml -rw-r--r-- 1.0 KiB
7aed0b0bJordan Robinson update readme 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Check

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-24.04

    services:
      postgres:
        image: postgres
        env:
          POSTGRES_PASSWORD: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 5432:5432

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.13'

      - name: Install uv
        run: curl -LsSf https://astral.sh/uv/0.8.8/install.sh | sh

      - name: Run Python linting
        run: uv run ruff check

      - name: Run HTML linting
        run: uv run djade main/templates/**/*.html

      - name: Run Tests
        run: |
          uv run manage.py collectstatic --no-input
          uv run manage.py test
        env:
          DEBUG: '1'
          SECRET_KEY: 'thisisthesecretkey'
          DATABASE_URL: 'postgres://postgres:postgres@localhost:5432/postgres'