-
Notifications
You must be signed in to change notification settings - Fork 50
71 lines (65 loc) · 2.1 KB
/
build.yml
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
name: Build
on:
push:
branches: [ development ]
paths-ignore:
- 'src/pretalx/locale/**'
- 'doc/**'
pull_request:
branches: [ development ]
paths-ignore:
- 'src/pretalx/locale/**'
- 'doc/**'
permissions:
contents: read # to fetch code (actions/checkout)
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
packaging:
runs-on: ubuntu-latest
name: Packaging
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install frontend dependencies
run: npm ci
working-directory: ./src/pretalx/frontend/schedule-editor
- name: Install system dependencies
run: sudo apt update && sudo apt install gettext unzip
- name: Install Python dependencies
run: python -m pip install twine wheel -Ue ".[dev]"
- name: Run check-manifest
run: check-manifest
- name: Run build
run: python -m build
- name: Check package
run: twine check dist/*
- name: Check files to make sure we ship our frontend
run: unzip -l dist/pretalx*whl | grep frontend || exit 1
- name: Check files to make sure we ship our frontend but not our node_modules
run: unzip -l dist/pretalx*whl | grep node_modules && exit 1 || exit 0
- name: Install the created wheel package with pip
run: |
# Switch to a new virtualenv
mkdir test_venv
python -m venv test_venv
. test_venv/bin/activate
python -m pip install dist/pretalx*whl
- name: Make sure we can run pretalx commands
run: python -m pretalx help
- name: Make sure we can run through all migrations
run: python -m pretalx migrate