-
-
Notifications
You must be signed in to change notification settings - Fork 302
77 lines (75 loc) · 2.12 KB
/
deploytest.yml
File metadata and controls
77 lines (75 loc) · 2.12 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
69
70
71
72
73
74
75
76
77
name: Build and deploy tests
on:
push:
branches:
- unstable
- hotfixes
- master
pull_request:
jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
paths: '["**.py", "requirements.txt", ".github/workflows/deploytest.yml", "**.vue", "**.js", "pnpm-lock.yaml", "package.json"]'
build_assets:
name: Build frontend assets
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Use pnpm
uses: pnpm/action-setup@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '20.x'
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
pnpm rebuild node-sass
- name: Build frontend
run: pnpm run build
make_messages:
name: Build all message files
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: '3.10'
activate-environment: "true"
enable-cache: "true"
- name: Install python dependencies with uv
run: |
# Use uv to install dependencies directly from requirements files
uv pip sync requirements.txt
- name: Use pnpm
uses: pnpm/action-setup@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '20.x'
cache: 'pnpm'
- name: Install node dependencies
run: |
pnpm install --frozen-lockfile
pnpm rebuild node-sass
- name: Install gettext
run: |
sudo apt-get update -y
sudo apt-get install -y gettext
- name: Test Django makemessages
run: python contentcuration/manage.py makemessages --all