forked from WeblateOrg/weblate
-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (107 loc) · 2.94 KB
/
setup.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Copyright © Michal Čihař <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: Distribution
on:
push:
branches-ignore:
- deepsource-fix-**
- renovate/**
- weblate
pull_request:
permissions:
contents: read
jobs:
setup:
runs-on: ubuntu-22.04
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: default,ignore:unclosed:ResourceWarning
steps:
- uses: actions/checkout@v4
- name: Install apt dependencies
run: sudo ./ci/apt-install
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Used versions
run: ./ci/print-versions
- name: Install pip dependencies
run: ./ci/pip-install
- name: Install Weblate
run: coverage run ./setup.py install
- name: Check difference
run: diff -ruNqp weblate $(python -c 'import weblate; import os; print(os.path.dirname(weblate.__file__))')
- name: Coverage
run: |
coverage combine
coverage xml
- uses: codecov/codecov-action@v3
with:
flags: setup
name: setup
pip:
runs-on: ubuntu-22.04
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: default,ignore:unclosed:ResourceWarning
steps:
- uses: actions/checkout@v4
- name: Install apt dependencies
run: sudo ./ci/apt-install
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Used versions
run: ./ci/print-versions
- name: Install pip dependencies
run: ./ci/pip-install
- name: Install Weblate
run: pip install '.[all]'
- name: Check difference
run: diff -ruNqp weblate $(python -c 'import weblate; import os; print(os.path.dirname(weblate.__file__))')
dist:
runs-on: ubuntu-22.04
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: default,ignore:unclosed:ResourceWarning
steps:
- uses: actions/checkout@v4
- name: Install apt dependencies
run: sudo ./ci/apt-install
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Install pip dependencies
run: ./ci/pip-install
- name: Build sdist
run: coverage run ./setup.py sdist
- name: Install sdist
run: |
pip install ./dist/*.tar.gz
pip uninstall --yes Weblate
- name: Build wheel
run: coverage run ./setup.py bdist_wheel
- name: Install wheel
run: |
pip install ./dist/*.whl
pip uninstall --yes Weblate
- name: Twine check
run: twine check dist/*
- name: Coverage
run: |
coverage combine
coverage xml
- uses: codecov/codecov-action@v3
with:
flags: setup
name: dist