forked from coldfront/coldfront
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (53 loc) · 1.73 KB
/
Copy pathci.yml
File metadata and controls
68 lines (53 loc) · 1.73 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
node-version: ["24.x"]
env:
PLUGIN_API: true
DJANGO_VITE_DEV_MODE: true
steps:
- uses: actions/checkout@v6
- name: Install uv and set the python version
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
python-version: ${{ matrix.python-version }}
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Install the project
run: uv sync --locked --dev
- name: Install frontend packages
run: npm --prefix coldfront/static install
- name: Check for lint violations
run: uv run ruff check
- name: Check formatting
run: uv run ruff format --check
- name: Check frontend with eslint and prettier
run: npm --prefix coldfront/static run check
- name: Compile and bundle frontend static assets
run: npm --prefix coldfront/static run build
- name: Check bundled frontend static assets have been commited
run: |
if [[ `git status --porcelain` ]]; then
echo "Error: pre-compiled bundled frontend static assets have not been committed"
git status
exit 1
else
echo "Bundled frontend static assets check passed."
fi
- name: Check licence with reuse
run: uv run reuse lint
- name: Run tests
run: uv run coldfront test
- name: Check for migrations
run: uv run coldfront makemigrations --check