-
Notifications
You must be signed in to change notification settings - Fork 895
82 lines (72 loc) · 2.66 KB
/
Copy pathcheck-python-build.yml
File metadata and controls
82 lines (72 loc) · 2.66 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
78
79
80
81
82
name: Check Python build
on:
# Callable from snapshot.yml, so that what gets published is the
# same build that runs on every push rather than a second
# definition of it that can drift.
workflow_call:
push:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'pkg/pip/**'
- 'requirements.txt'
- 'Makefile'
- 'docs/**'
- 'LICENSE'
- 'README.md'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-python-build.yml'
pull_request:
branches: [ "master" ]
paths:
- 'web/**'
# Not the message catalogues: a .po change cannot break a build or a
# test, and check-translations already compiles them, which is the
# check that would catch a malformed one.
- '!web/pgadmin/translations/**'
- 'pkg/pip/**'
- 'requirements.txt'
- 'Makefile'
- 'docs/**'
- 'LICENSE'
- 'README.md'
- 'tools/setup-python-env.sh'
- '.github/workflows/check-python-build.yml'
workflow_dispatch:
concurrency:
# The workflow's own name, spelled out rather than taken from
# github.workflow, because in a reusable workflow that expression is
# the CALLER's name. Every workflow Snapshot calls would otherwise
# share one group and, with cancel-in-progress, cancel each other.
# github.event_name is in the key because a called workflow inherits the
# caller's ref: once this is on master, the nightly Snapshot's deb build
# and an ordinary push's deb build would otherwise share a group and,
# with cancel-in-progress, kill each other. A push landing mid-nightly
# would cancel the snapshot's build and skip the publish entirely.
group: 'check-python-build @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} @ ${{ github.event_name }}'
cancel-in-progress: true
jobs:
build-python-package:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v7
- name: Install platform dependencies
run: |
sudo apt update
sudo apt install -y libpq-dev libffi-dev libssl-dev libkrb5-dev zlib1g-dev
- name: Install Python dependencies
run: make install-python
- name: Check the Python wheel build
run: |
. venv/bin/activate
make pip
- name: Archive Python wheel
uses: actions/upload-artifact@v7
with:
name: pgadmin4-python-build-output
if-no-files-found: error
path: dist/*