Mercurial > p > roundup > code
annotate .github/workflows/ci-test.yml @ 8514:015a0197fac4
chore(build): bump actions/setup-python from 6.1.0 to 6.2.0 pull #81
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 27 Jan 2026 21:42:34 -0500 |
| parents | 951db0950174 |
| children | f676eda10c20 |
| rev | line source |
|---|---|
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
1 # merged in python-package.yml workflow |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
2 |
|
7055
83dc71b3211f
add web references used to build github ci file.
John Rouillard <rouilj@ieee.org>
parents:
6955
diff
changeset
|
3 # reference docs: |
|
83dc71b3211f
add web references used to build github ci file.
John Rouillard <rouilj@ieee.org>
parents:
6955
diff
changeset
|
4 # https://blog.deepjyoti30.dev/tests-github-python |
|
83dc71b3211f
add web references used to build github ci file.
John Rouillard <rouilj@ieee.org>
parents:
6955
diff
changeset
|
5 # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python |
| 7097 | 6 # https://github.com/pypa/twine/blob/main/.github/workflows/main.yml |
| 7 | |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
8 name: roundup-ci |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
9 |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
10 on: |
|
6887
dc7b886c42e4
run on any branch push except maint-1.6
John Rouillard <rouilj@ieee.org>
parents:
6886
diff
changeset
|
11 push: |
|
6904
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
12 # skip if github.ref is 'refs/heads/maint-1.6' |
|
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
13 # aka github.ref_name of 'maint-1.6' |
|
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
14 # see https://github.com/orgs/community/discussions/26253 |
|
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
15 # for mechanism to control matrix based on branch |
|
6887
dc7b886c42e4
run on any branch push except maint-1.6
John Rouillard <rouilj@ieee.org>
parents:
6886
diff
changeset
|
16 branches: [ "*", '!maint-1.6' ] |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
17 # pull_request: |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
18 # branches: [ "master" ] |
|
6880
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
19 schedule: |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
20 # monthly build/check |
|
6885
cc9bd0dd39fc
change time again. also build on all pushes
John Rouillard <rouilj@ieee.org>
parents:
6884
diff
changeset
|
21 - cron: '23 17 1 * *' |
|
7849
3fe2e7b3df58
test(github-ci): add method to ssh into a CI test environment
John Rouillard <rouilj@ieee.org>
parents:
7828
diff
changeset
|
22 workflow_dispatch: |
|
3fe2e7b3df58
test(github-ci): add method to ssh into a CI test environment
John Rouillard <rouilj@ieee.org>
parents:
7828
diff
changeset
|
23 inputs: |
|
3fe2e7b3df58
test(github-ci): add method to ssh into a CI test environment
John Rouillard <rouilj@ieee.org>
parents:
7828
diff
changeset
|
24 debug_enabled: |
|
3fe2e7b3df58
test(github-ci): add method to ssh into a CI test environment
John Rouillard <rouilj@ieee.org>
parents:
7828
diff
changeset
|
25 type: boolean |
|
3fe2e7b3df58
test(github-ci): add method to ssh into a CI test environment
John Rouillard <rouilj@ieee.org>
parents:
7828
diff
changeset
|
26 description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' |
|
3fe2e7b3df58
test(github-ci): add method to ssh into a CI test environment
John Rouillard <rouilj@ieee.org>
parents:
7828
diff
changeset
|
27 required: false |
|
3fe2e7b3df58
test(github-ci): add method to ssh into a CI test environment
John Rouillard <rouilj@ieee.org>
parents:
7828
diff
changeset
|
28 default: false |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
29 |
|
6914
6010c20dc104
add mock package for testing
John Rouillard <rouilj@ieee.org>
parents:
6904
diff
changeset
|
30 # GITHUB_TOKEN only has read repo context. |
|
6010c20dc104
add mock package for testing
John Rouillard <rouilj@ieee.org>
parents:
6904
diff
changeset
|
31 permissions: |
|
6010c20dc104
add mock package for testing
John Rouillard <rouilj@ieee.org>
parents:
6904
diff
changeset
|
32 contents: read |
|
6010c20dc104
add mock package for testing
John Rouillard <rouilj@ieee.org>
parents:
6904
diff
changeset
|
33 |
|
6953
301f352b5d63
Only do one build at a time. Cancel older in progress builds.
John Rouillard <rouilj@ieee.org>
parents:
6952
diff
changeset
|
34 concurrency: |
|
301f352b5d63
Only do one build at a time. Cancel older in progress builds.
John Rouillard <rouilj@ieee.org>
parents:
6952
diff
changeset
|
35 group: ${{ github.workflow }}-${{ github.ref }} |
| 6954 | 36 cancel-in-progress: true |
|
6953
301f352b5d63
Only do one build at a time. Cancel older in progress builds.
John Rouillard <rouilj@ieee.org>
parents:
6952
diff
changeset
|
37 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
38 jobs: |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
39 test: |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
40 name: CI build test |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
41 |
|
6891
be310c5f866e
another trial with exclude and include
John Rouillard <rouilj@ieee.org>
parents:
6890
diff
changeset
|
42 #runs-on: ubuntu-latest |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
43 # use below if running on multiple OS's. |
|
6891
be310c5f866e
another trial with exclude and include
John Rouillard <rouilj@ieee.org>
parents:
6890
diff
changeset
|
44 runs-on: ${{ matrix.os }} |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
45 |
|
7194
8dc5b3739367
Prevent github actions from running if commit includes 'no-github-ci'
John Rouillard <rouilj@ieee.org>
parents:
7187
diff
changeset
|
46 if: "!contains(github.event.head_commit.message, 'no-github-ci')" |
|
8dc5b3739367
Prevent github actions from running if commit includes 'no-github-ci'
John Rouillard <rouilj@ieee.org>
parents:
7187
diff
changeset
|
47 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
48 strategy: |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
49 fail-fast: false |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
50 max-parallel: 4 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
51 matrix: |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
52 # Run in all these versions of Python |
|
7107
8e2219abbde3
infra: support new ubuntu 22.04 runners.
John Rouillard <rouilj@ieee.org>
parents:
7105
diff
changeset
|
53 python-version: |
|
7510
8ae4b6498345
Disable python 2.7 tests on github.
John Rouillard <rouilj@ieee.org>
parents:
7509
diff
changeset
|
54 # - "2.7" |
|
8470
eb132047dd21
chore: update ci test to include 3.14/3.14t drop 3.12
John Rouillard <rouilj@ieee.org>
parents:
8445
diff
changeset
|
55 - "3.14" |
|
8118
c88ad93f0e77
issue2551339 - psycopg2 on 3.13 github runner crashes on import
John Rouillard <rouilj@ieee.org>
parents:
8117
diff
changeset
|
56 - "3.13" |
|
8470
eb132047dd21
chore: update ci test to include 3.14/3.14t drop 3.12
John Rouillard <rouilj@ieee.org>
parents:
8445
diff
changeset
|
57 # - "3.7" run via include for ubuntu-22.04 |
|
8140
0bd23d5a8122
test changes for 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8118
diff
changeset
|
58 # - "3.8" run via include for ubuntu-22.04 |
|
7894
7b0a143ac806
test: disable Python 3.13 CI xapian build. Fails with compile error.
John Rouillard <rouilj@ieee.org>
parents:
7893
diff
changeset
|
59 # - "3.9" |
|
7b0a143ac806
test: disable Python 3.13 CI xapian build. Fails with compile error.
John Rouillard <rouilj@ieee.org>
parents:
7893
diff
changeset
|
60 - "3.10" |
|
8152
0d2a95352679
drop testing python 3.11 from matrix.
John Rouillard <rouilj@ieee.org>
parents:
8151
diff
changeset
|
61 # - "3.11" |
|
8470
eb132047dd21
chore: update ci test to include 3.14/3.14t drop 3.12
John Rouillard <rouilj@ieee.org>
parents:
8445
diff
changeset
|
62 # - "3.12" |
|
6904
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
63 |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
64 # use for multiple os or ubuntu versions |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
65 #os: [ubuntu-latest, macos-latest, windows-latest] |
|
7107
8e2219abbde3
infra: support new ubuntu 22.04 runners.
John Rouillard <rouilj@ieee.org>
parents:
7105
diff
changeset
|
66 # ubuntu latest 22.04 12/2022 |
|
8140
0bd23d5a8122
test changes for 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8118
diff
changeset
|
67 # ubuntu latest 24.04 12/2024 |
|
8222
54dfda1c4fe5
issue251338 - xapian doesn't build in CI for 3.13 python
John Rouillard <rouilj@ieee.org>
parents:
8158
diff
changeset
|
68 os: [ubuntu-latest] |
|
6904
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
69 |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
70 # if the ones above fail. fail the build |
| 7540 | 71 experimental: [ false ] |
|
6904
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
72 |
|
6888
f4705aba3503
add ubuntu-22.04 for 3.10 and 3.8
John Rouillard <rouilj@ieee.org>
parents:
6887
diff
changeset
|
73 include: |
|
8332
ac48adc9ed39
test: run tests with free threaded python 3.13
John Rouillard <rouilj@ieee.org>
parents:
8331
diff
changeset
|
74 # example: if this version fails the jobs still succeeds |
|
7893
ff5cadffa8f0
chore: change spec for 3.13.
John Rouillard <rouilj@ieee.org>
parents:
7892
diff
changeset
|
75 # allow-prereleases in setup-python allows alpha/beta |
|
8332
ac48adc9ed39
test: run tests with free threaded python 3.13
John Rouillard <rouilj@ieee.org>
parents:
8331
diff
changeset
|
76 # releases to run. Also allow free threaded python testing |
|
8470
eb132047dd21
chore: update ci test to include 3.14/3.14t drop 3.12
John Rouillard <rouilj@ieee.org>
parents:
8445
diff
changeset
|
77 - python-version: 3.14t |
|
8332
ac48adc9ed39
test: run tests with free threaded python 3.13
John Rouillard <rouilj@ieee.org>
parents:
8331
diff
changeset
|
78 os: ubuntu-24.04 |
|
ac48adc9ed39
test: run tests with free threaded python 3.13
John Rouillard <rouilj@ieee.org>
parents:
8331
diff
changeset
|
79 experimental: true |
| 7534 | 80 |
|
8309
81ca7ceb71db
build: issue2551397: remove support for python 3.6
John Rouillard <rouilj@ieee.org>
parents:
8223
diff
changeset
|
81 # 3.7 not available on new 22.04 runners, so run on 22.04 ubuntu |
|
81ca7ceb71db
build: issue2551397: remove support for python 3.6
John Rouillard <rouilj@ieee.org>
parents:
8223
diff
changeset
|
82 - python-version: 3.7 |
|
81ca7ceb71db
build: issue2551397: remove support for python 3.6
John Rouillard <rouilj@ieee.org>
parents:
8223
diff
changeset
|
83 os: ubuntu-22.04 |
|
6904
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
84 |
|
8140
0bd23d5a8122
test changes for 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8118
diff
changeset
|
85 # 3.8 not available on new 24.04 runners, so run on 22.04 ubuntu |
|
0bd23d5a8122
test changes for 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8118
diff
changeset
|
86 - python-version: 3.8 |
|
0bd23d5a8122
test changes for 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8118
diff
changeset
|
87 os: ubuntu-22.04 |
|
0bd23d5a8122
test changes for 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8118
diff
changeset
|
88 |
| 8223 | 89 #exclude: |
|
8222
54dfda1c4fe5
issue251338 - xapian doesn't build in CI for 3.13 python
John Rouillard <rouilj@ieee.org>
parents:
8158
diff
changeset
|
90 # skip all python versions on explicit 20.04/24.04 unless |
|
8140
0bd23d5a8122
test changes for 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8118
diff
changeset
|
91 # explicitly included |
|
8222
54dfda1c4fe5
issue251338 - xapian doesn't build in CI for 3.13 python
John Rouillard <rouilj@ieee.org>
parents:
8158
diff
changeset
|
92 #- os: ubuntu-20.04 |
|
54dfda1c4fe5
issue251338 - xapian doesn't build in CI for 3.13 python
John Rouillard <rouilj@ieee.org>
parents:
8158
diff
changeset
|
93 #- os: ubuntu-24.04 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
94 |
|
8150
911c6b0fbaf7
cleanup - 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8149
diff
changeset
|
95 # disable when testing ubuntu-24.04 to speed up |
|
911c6b0fbaf7
cleanup - 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8149
diff
changeset
|
96 # runs. |
|
911c6b0fbaf7
cleanup - 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8149
diff
changeset
|
97 # - os: ubuntu-latest |
|
911c6b0fbaf7
cleanup - 24.04 ubuntu github action migration
John Rouillard <rouilj@ieee.org>
parents:
8149
diff
changeset
|
98 |
|
7541
72e1ee3a46c0
one last try move continue-on-error after all matrix defs
John Rouillard <rouilj@ieee.org>
parents:
7540
diff
changeset
|
99 # run the finalizer for coveralls even if one or more |
|
72e1ee3a46c0
one last try move continue-on-error after all matrix defs
John Rouillard <rouilj@ieee.org>
parents:
7540
diff
changeset
|
100 # experimental matrix runs fail. |
| 7542 | 101 # moving it above strategy produces unexpected value false |
| 102 # moving it below (here) produces unexpected value ''. | |
| 103 # continue-on-error: ${{ matrix.experimental }} | |
|
7541
72e1ee3a46c0
one last try move continue-on-error after all matrix defs
John Rouillard <rouilj@ieee.org>
parents:
7540
diff
changeset
|
104 |
| 6858 | 105 env: |
|
6864
7e907d97deb6
redis, gpg, more myql debugging
John Rouillard <rouilj@ieee.org>
parents:
6863
diff
changeset
|
106 # get colorized pytest output even without a controlling tty |
|
7e907d97deb6
redis, gpg, more myql debugging
John Rouillard <rouilj@ieee.org>
parents:
6863
diff
changeset
|
107 PYTEST_ADDOPTS: "--color=yes" |
|
6859
ebdadf3b2653
fixes and re-enable mysql.
John Rouillard <rouilj@ieee.org>
parents:
6858
diff
changeset
|
108 # OS: ${{ matrix.os }} |
| 6860 | 109 PYTHON_VERSION: ${{ matrix.python-version }} |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
110 |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
111 steps: |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
112 # Checkout the latest code from the repo |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
113 - name: Checkout source |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
114 # example directives: |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
115 # disable step |
| 6873 | 116 # if: {{ false }} |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
117 # continue running if step fails |
| 6874 | 118 # continue-on-error: true |
|
8512
951db0950174
chore(build): bump actions/checkout from 6.0.1 to 6.0.2 pull #79
John Rouillard <rouilj@ieee.org>
parents:
8497
diff
changeset
|
119 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
120 |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
121 # Setup version of Python to use |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
122 - name: Set Up Python ${{ matrix.python-version }} |
|
8514
015a0197fac4
chore(build): bump actions/setup-python from 6.1.0 to 6.2.0 pull #81
John Rouillard <rouilj@ieee.org>
parents:
8512
diff
changeset
|
123 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
124 with: |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
125 python-version: ${{ matrix.python-version }} |
|
7272
2e48fb118772
Allow fallback to pre-release versions if GA version not released.
John Rouillard <rouilj@ieee.org>
parents:
7271
diff
changeset
|
126 allow-prereleases: true |
| 6879 | 127 cache: 'pip' |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
128 |
|
7415
f636c3c5333e
Move setuptools install location and print version
John Rouillard <rouilj@ieee.org>
parents:
7414
diff
changeset
|
129 - name: Install build tools - setuptools |
|
f636c3c5333e
Move setuptools install location and print version
John Rouillard <rouilj@ieee.org>
parents:
7414
diff
changeset
|
130 run: pip install setuptools |
|
f636c3c5333e
Move setuptools install location and print version
John Rouillard <rouilj@ieee.org>
parents:
7414
diff
changeset
|
131 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
132 # Display the Python version being used |
|
6920
b3fb615b81c4
get info about sqlite version
John Rouillard <rouilj@ieee.org>
parents:
6919
diff
changeset
|
133 - name: Display Python and key module versions |
|
b3fb615b81c4
get info about sqlite version
John Rouillard <rouilj@ieee.org>
parents:
6919
diff
changeset
|
134 run: | |
|
8332
ac48adc9ed39
test: run tests with free threaded python 3.13
John Rouillard <rouilj@ieee.org>
parents:
8331
diff
changeset
|
135 python --version --version |
|
8335
cf757cd416dc
chore: fix label for Py_GIL_DISABLED python config var.
John Rouillard <rouilj@ieee.org>
parents:
8333
diff
changeset
|
136 python -c "import sysconfig; print('GIL IS DISABLED: ', sysconfig.get_config_vars().get('Py_GIL_DISABLED', 'not defined'));" |
|
7274
5ecaebc08447
remove obsolete sqlite3.version
John Rouillard <rouilj@ieee.org>
parents:
7272
diff
changeset
|
137 python -c "import sqlite3; print('sqlite version: ', sqlite3.sqlite_version)" |
|
7415
f636c3c5333e
Move setuptools install location and print version
John Rouillard <rouilj@ieee.org>
parents:
7414
diff
changeset
|
138 python -c "import setuptools; print('setuptools version: ', setuptools.__version__);" |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
139 |
|
8342
b38327f15450
test: set PYTHON_GIL to disable when using freethreaded
John Rouillard <rouilj@ieee.org>
parents:
8335
diff
changeset
|
140 # from: |
|
b38327f15450
test: set PYTHON_GIL to disable when using freethreaded
John Rouillard <rouilj@ieee.org>
parents:
8335
diff
changeset
|
141 # https://hugovk.dev/blog/2025/free-threaded-python-on-github-actions/ |
|
b38327f15450
test: set PYTHON_GIL to disable when using freethreaded
John Rouillard <rouilj@ieee.org>
parents:
8335
diff
changeset
|
142 - name: Set PYTHON_GIL when freethreaded |
|
b38327f15450
test: set PYTHON_GIL to disable when using freethreaded
John Rouillard <rouilj@ieee.org>
parents:
8335
diff
changeset
|
143 if: endsWith(matrix.python-version, 't') |
|
b38327f15450
test: set PYTHON_GIL to disable when using freethreaded
John Rouillard <rouilj@ieee.org>
parents:
8335
diff
changeset
|
144 run: | |
|
b38327f15450
test: set PYTHON_GIL to disable when using freethreaded
John Rouillard <rouilj@ieee.org>
parents:
8335
diff
changeset
|
145 echo "PYTHON_GIL=0" >> "$GITHUB_ENV" |
|
7763
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
146 - name: Update pip |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
147 run: python -m pip install --upgrade pip |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
148 |
|
7823
5ac9253d2a5f
test: add comment that ci tests don't need pytest-env.
John Rouillard <rouilj@ieee.org>
parents:
7763
diff
changeset
|
149 # note pytest-env is not needed for redis password as there is |
|
5ac9253d2a5f
test: add comment that ci tests don't need pytest-env.
John Rouillard <rouilj@ieee.org>
parents:
7763
diff
changeset
|
150 # no password on CI's redis. |
|
7763
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
151 - name: Install pytest and other packages needed for running tests |
| 7828 | 152 run: pip install flake8 hypothesis mock pytest pytest-cov requests sphinx-tabs |
|
7763
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
153 |
|
7852
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
154 # https://github.com/mxschmitt/action-tmate |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
155 # allow remote ssh into the CI container. I need this to debug |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
156 # some xfail cases |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
157 - name: Setup tmate session |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
158 uses: mxschmitt/action-tmate@v3 |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
159 if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
160 timeout-minutes: 10 |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
161 with: |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
162 limit-access-to-actor: true |
|
9e686e3f39c1
test(githubci): incrase duration of tmate shell on test runner
John Rouillard <rouilj@ieee.org>
parents:
7850
diff
changeset
|
163 |
|
7763
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
164 - name: run flake8 - abort for syntax error, otherwise warn only |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
165 run: | |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
166 # stop the build for Python syntax errors or undefined names |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
167 # talgettext is a utility function ignore it. |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
168 flake8 roundup --count --select=E9,F63,F7,F82 --show-source --statistics --extend-exclude talgettext.py |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
169 # exit-zero treats all errors as warnings. |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
170 # The GitHub editor is 127 chars wide |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
171 flake8 roundup --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
|
a8891a0e10cb
chore: optimize build file make it error sooner on flake8 tests
John Rouillard <rouilj@ieee.org>
parents:
7742
diff
changeset
|
172 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
173 # Install the databases |
| 6852 | 174 - name: Install mysql/mariadb |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
175 run: | |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
176 #set -xv |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
177 # mysql is pre-installed and active but this is the install command |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
178 # sudo apt-get install mysql-server mysql-client |
|
6841
3671c0f6352e
More fixes to yaml using linter:
John Rouillard <rouilj@ieee.org>
parents:
6840
diff
changeset
|
179 # set up mysql database |
|
6870
b040642efae3
mysql sleep and more debug
John Rouillard <rouilj@ieee.org>
parents:
6869
diff
changeset
|
180 sudo sed -i -e '/^\[mysqld\]/,/^\[mysql/s/^#* *max_allowed_packet.*/max_allowed_packet = 500M/' /etc/mysql/mysql.conf.d/mysqld.cnf; sleep 3 |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
181 #tail -n +0 /etc/mysql/my.cnf /etc/mysql/mysql.conf.d/mysqld.cnf |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
182 #grep max_allowed /etc/mysql/mysql.conf.d/mysqld.cnf |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
183 #ls /etc/mysql/conf.d/ /etc/mysql/mysql.conf.d/ |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
184 #sleep 5 |
|
7488
76d4c3d43258
Speed up postgresql by disabiling durability settings.
John Rouillard <rouilj@ieee.org>
parents:
7487
diff
changeset
|
185 # try to improve performance speed by disabling some ACID |
|
76d4c3d43258
Speed up postgresql by disabiling durability settings.
John Rouillard <rouilj@ieee.org>
parents:
7487
diff
changeset
|
186 # settings and change some layout defaults. |
| 7489 | 187 sudo sed -i -e '$a\innodb_flush_log_at_trx_commit = 2' /etc/mysql/mysql.conf.d/mysqld.cnf |
| 188 sudo sed -i -e '$a\innodb_file_per_table = OFF' /etc/mysql/mysql.conf.d/mysqld.cnf | |
| 189 sudo sed -i -e '$a\innodb_doublewrite=OFF' /etc/mysql/mysql.conf.d/mysqld.cnf | |
| 190 sudo sed -i -e '$a\innodb_fast_shutdown=2' /etc/mysql/mysql.conf.d/mysqld.cnf | |
| 191 sudo sed -i -e '$a\innodb_log_file_size=1048576' /etc/mysql/mysql.conf.d/mysqld.cnf | |
| 192 sudo sed -i -e '$a\innodb_flush_method=O_DIRECT' /etc/mysql/mysql.conf.d/mysqld.cnf | |
| 193 sudo sed -i -e '$a\innodb_log_buffer_size=3M' /etc/mysql/mysql.conf.d/mysqld.cnf | |
| 194 sudo sed -i -e '$a\innodb_buffer_pool_size=180M' /etc/mysql/mysql.conf.d/mysqld.cnf | |
|
7488
76d4c3d43258
Speed up postgresql by disabiling durability settings.
John Rouillard <rouilj@ieee.org>
parents:
7487
diff
changeset
|
195 sleep 3 |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
196 sudo service mysql restart |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
197 #sleep 10 |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
198 #ps -ef | grep mysqld |
|
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
199 #sudo netstat -anp | grep mysqld |
|
6877
ac2b8a8f5727
fix mysql SQL to create user and grant. set max jobs in parallel
John Rouillard <rouilj@ieee.org>
parents:
6876
diff
changeset
|
200 sudo mysql -u root -proot -e 'CREATE USER "rounduptest"@"localhost" IDENTIFIED WITH mysql_native_password BY "rounduptest"; GRANT ALL on rounduptest.* TO "rounduptest"@"localhost";' |
| 6873 | 201 |
| 202 - name: Install postgres | |
| 203 run: | | |
|
7417
6b332e3d7c43
try to fix postgres install on ubuntu 20.04 for Python 3.6.
John Rouillard <rouilj@ieee.org>
parents:
7415
diff
changeset
|
204 sudo apt-get update && sudo apt-get install postgresql |
|
7488
76d4c3d43258
Speed up postgresql by disabiling durability settings.
John Rouillard <rouilj@ieee.org>
parents:
7487
diff
changeset
|
205 # Disable fsync, full page writes for speed, |
|
76d4c3d43258
Speed up postgresql by disabiling durability settings.
John Rouillard <rouilj@ieee.org>
parents:
7487
diff
changeset
|
206 # don't care about data durability when testing |
| 6873 | 207 sudo sed -i -e '$a\fsync = off' /etc/postgresql/*/*/postgresql.conf |
|
7488
76d4c3d43258
Speed up postgresql by disabiling durability settings.
John Rouillard <rouilj@ieee.org>
parents:
7487
diff
changeset
|
208 sudo sed -i -e '$a\full_page_writes = off' /etc/postgresql/*/*/postgresql.conf |
|
76d4c3d43258
Speed up postgresql by disabiling durability settings.
John Rouillard <rouilj@ieee.org>
parents:
7487
diff
changeset
|
209 sudo sed -i -e '$a\synchronous_commit = off' /etc/postgresql/*/*/postgresql.conf |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
210 sudo service postgresql restart; sleep 10 |
| 6873 | 211 # set up postgresql database |
| 212 sudo -u postgres psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres | |
|
7719
3071db43bfb6
feat: issue2550852 - support using a specified PostgreSQL db schema
John Rouillard <rouilj@ieee.org>
parents:
7656
diff
changeset
|
213 sudo -u postgres psql -c "CREATE ROLE rounduptest_schema LOGIN PASSWORD 'rounduptest';" -U postgres |
|
7721
d55427443443
chore: fix ci yaml formatting.
John Rouillard <rouilj@ieee.org>
parents:
7719
diff
changeset
|
214 sudo -u postgres psql -c "CREATE DATABASE rounduptest_schema;" -U postgres |
|
d55427443443
chore: fix ci yaml formatting.
John Rouillard <rouilj@ieee.org>
parents:
7719
diff
changeset
|
215 sudo -u postgres psql -c "GRANT CREATE ON DATABASE rounduptest_schema TO rounduptest_schema;" -U postgres |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
216 |
|
6864
7e907d97deb6
redis, gpg, more myql debugging
John Rouillard <rouilj@ieee.org>
parents:
6863
diff
changeset
|
217 - name: install redis |
|
6865
e69b4bfaccd3
pip redis in, fix markdown2 test, install ReST, mysql edit
John Rouillard <rouilj@ieee.org>
parents:
6864
diff
changeset
|
218 run: | |
|
e69b4bfaccd3
pip redis in, fix markdown2 test, install ReST, mysql edit
John Rouillard <rouilj@ieee.org>
parents:
6864
diff
changeset
|
219 sudo apt-get install redis |
|
e69b4bfaccd3
pip redis in, fix markdown2 test, install ReST, mysql edit
John Rouillard <rouilj@ieee.org>
parents:
6864
diff
changeset
|
220 pip install redis |
|
6864
7e907d97deb6
redis, gpg, more myql debugging
John Rouillard <rouilj@ieee.org>
parents:
6863
diff
changeset
|
221 |
|
6878
81d811b8d45f
set full python version string; other cleanups
John Rouillard <rouilj@ieee.org>
parents:
6877
diff
changeset
|
222 - name: Install python db libraries |
|
7896
dc3bf565794a
test(ci): disable psycopg2 install for 3.13
John Rouillard <rouilj@ieee.org>
parents:
7895
diff
changeset
|
223 run: | |
|
dc3bf565794a
test(ci): disable psycopg2 install for 3.13
John Rouillard <rouilj@ieee.org>
parents:
7895
diff
changeset
|
224 pip install mysqlclient |
|
8118
c88ad93f0e77
issue2551339 - psycopg2 on 3.13 github runner crashes on import
John Rouillard <rouilj@ieee.org>
parents:
8117
diff
changeset
|
225 pip install psycopg2 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
226 |
|
8153
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
227 # https://github.com/mxschmitt/action-tmate |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
228 # allow remote ssh into the CI container. I need this to debug |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
229 # some xfail cases |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
230 - name: Setup tmate session |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
231 uses: mxschmitt/action-tmate@v3 |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
232 if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
233 timeout-minutes: 10 |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
234 with: |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
235 limit-access-to-actor: true |
|
18a391e63202
add new tmate debug point.
John Rouillard <rouilj@ieee.org>
parents:
8152
diff
changeset
|
236 |
|
6865
e69b4bfaccd3
pip redis in, fix markdown2 test, install ReST, mysql edit
John Rouillard <rouilj@ieee.org>
parents:
6864
diff
changeset
|
237 - name: Install auxiliary packages |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
238 run: | |
|
8151
c43b2bd8e203
add gpg package to build - ubuntu-22.04 python 3.13 skips pgp tests.
John Rouillard <rouilj@ieee.org>
parents:
8150
diff
changeset
|
239 sudo apt-get install swig gpg gpgsm libgpgme-dev |
|
6865
e69b4bfaccd3
pip redis in, fix markdown2 test, install ReST, mysql edit
John Rouillard <rouilj@ieee.org>
parents:
6864
diff
changeset
|
240 # pygments for markdown2 to highlight code blocks |
|
7891
3de80157606c
fix: revert markdown2 version limitation; markdown2 bug resolved
John Rouillard <rouilj@ieee.org>
parents:
7872
diff
changeset
|
241 pip install markdown2 pygments |
|
6865
e69b4bfaccd3
pip redis in, fix markdown2 test, install ReST, mysql edit
John Rouillard <rouilj@ieee.org>
parents:
6864
diff
changeset
|
242 # docutils for ReStructuredText |
|
8494
2741b3de4432
build: justhtml fails on python < 3.10
John Rouillard <rouilj@ieee.org>
parents:
8491
diff
changeset
|
243 pip install beautifulsoup4 brotli docutils jinja2 \ |
|
6866
a3ad2d1a4ea1
spec mistune version; force socket on mysql invocation
John Rouillard <rouilj@ieee.org>
parents:
6865
diff
changeset
|
244 mistune==0.8.4 pyjwt pytz whoosh |
|
8321
71e961941be6
chore(ci): issue2551368 make pip install gpg work for 24.04 ubuntu
John Rouillard <rouilj@ieee.org>
parents:
8309
diff
changeset
|
245 # gpg on PyPi is currently broken with newer OS platform |
|
71e961941be6
chore(ci): issue2551368 make pip install gpg work for 24.04 ubuntu
John Rouillard <rouilj@ieee.org>
parents:
8309
diff
changeset
|
246 # ubuntu 24.04 |
|
71e961941be6
chore(ci): issue2551368 make pip install gpg work for 24.04 ubuntu
John Rouillard <rouilj@ieee.org>
parents:
8309
diff
changeset
|
247 # used for newer Python versions. Temporarily use the |
|
71e961941be6
chore(ci): issue2551368 make pip install gpg work for 24.04 ubuntu
John Rouillard <rouilj@ieee.org>
parents:
8309
diff
changeset
|
248 # testing index, which contains a newer version of the |
|
71e961941be6
chore(ci): issue2551368 make pip install gpg work for 24.04 ubuntu
John Rouillard <rouilj@ieee.org>
parents:
8309
diff
changeset
|
249 # bindings on 24.04 or released version for other OS |
|
8331
d185fa6c4629
chore(build): issue2551368 gpg 2.0 released on test.pypi.org
John Rouillard <rouilj@ieee.org>
parents:
8325
diff
changeset
|
250 # versions. See issue2551368. 'pip install gpg' should work |
|
d185fa6c4629
chore(build): issue2551368 gpg 2.0 released on test.pypi.org
John Rouillard <rouilj@ieee.org>
parents:
8325
diff
changeset
|
251 # at some point when things are released to the production repo. |
|
8325
375c9f63f877
chore(ci): issue2551368 cleanup new gpg use
John Rouillard <rouilj@ieee.org>
parents:
8323
diff
changeset
|
252 pip install --index-url https://test.pypi.org/simple/ \ |
|
8331
d185fa6c4629
chore(build): issue2551368 gpg 2.0 released on test.pypi.org
John Rouillard <rouilj@ieee.org>
parents:
8325
diff
changeset
|
253 --extra-index-url https://pypi.org/simple gpg; |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
254 |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
255 - name: Install aux packages that need versions differences |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
256 # if zstd fails install, keep going with test, don't abort |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
257 run: | |
|
6842
d8d4600c49eb
More fixes to yaml using linter:
John Rouillard <rouilj@ieee.org>
parents:
6841
diff
changeset
|
258 set -xv |
| 6840 | 259 pip install zstd || true |
|
8495
1976dedb3319
build: prevent justhtml install < 3.10 python
John Rouillard <rouilj@ieee.org>
parents:
8494
diff
changeset
|
260 # justhtml supports python 3.10 or newer according to pypi |
|
1976dedb3319
build: prevent justhtml install < 3.10 python
John Rouillard <rouilj@ieee.org>
parents:
8494
diff
changeset
|
261 # page, but will install on 3.8 (and maybe 3.9) but formats |
|
1976dedb3319
build: prevent justhtml install < 3.10 python
John Rouillard <rouilj@ieee.org>
parents:
8494
diff
changeset
|
262 # differently. So skip install if before 3.10. |
|
1976dedb3319
build: prevent justhtml install < 3.10 python
John Rouillard <rouilj@ieee.org>
parents:
8494
diff
changeset
|
263 if echo $PYTHON_VERSION | grep '^3\...'; then |
|
1976dedb3319
build: prevent justhtml install < 3.10 python
John Rouillard <rouilj@ieee.org>
parents:
8494
diff
changeset
|
264 pip install justhtml || true; fi |
|
6861
097578791f7b
mysql verbose and remove -u
John Rouillard <rouilj@ieee.org>
parents:
6860
diff
changeset
|
265 if [[ "$PYTHON_VERSION" != "2."* ]]; then |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
266 pip install Markdown; fi |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
267 |
| 6867 | 268 - name: Install xapian |
| 269 run: | | |
| 7630 | 270 set -xv |
| 6867 | 271 sudo apt-get install libxapian-dev |
| 272 # Sphinx required to build the xapian python bindings. Use 1.8.5 on | |
| 273 # older python and newest on newer. | |
| 274 if [[ $PYTHON_VERSION == "2."* ]]; then pip install sphinx==1.8.5; fi | |
| 275 if [[ $PYTHON_VERSION == '3.'* ]] ; then pip install sphinx; fi | |
|
8158
9fe279eef724
cleanup special case - xapian doesn't build in CI for 3.13 python
John Rouillard <rouilj@ieee.org>
parents:
8153
diff
changeset
|
276 XAPIAN_VER=$(dpkg -l libxapian-dev | tail -n 1 | awk '{print $3}' | cut -d '-' -f 1); echo $XAPIAN_VER; |
| 6867 | 277 cd /tmp |
| 278 curl -s -O https://oligarchy.co.uk/xapian/$XAPIAN_VER/xapian-bindings-$XAPIAN_VER.tar.xz | |
| 279 tar -Jxvf xapian-bindings-$XAPIAN_VER.tar.xz | |
| 280 cd xapian-bindings-$XAPIAN_VER/ | |
| 281 if [[ $PYTHON_VERSION == "2."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python --disable-documentation; fi | |
| 282 # edit the configure script. | |
| 283 # distutils.sysconfig.get_config_vars('SO') doesn't work for | |
| 284 # 3.11 or newer. | |
| 285 # Change distutils.sysconfig... to just sysconfig and SO | |
| 286 # to EXT_SUFFIX to get valid value. | |
|
7628
88c13f6dbc95
build: try 3.12 xapian build again.
John Rouillard <rouilj@ieee.org>
parents:
7627
diff
changeset
|
287 if [[ $PYTHON_VERSION == "3."* ]]; then \ |
| 7630 | 288 cp configure configure.FCS; \ |
|
7628
88c13f6dbc95
build: try 3.12 xapian build again.
John Rouillard <rouilj@ieee.org>
parents:
7627
diff
changeset
|
289 sed -i \ |
|
88c13f6dbc95
build: try 3.12 xapian build again.
John Rouillard <rouilj@ieee.org>
parents:
7627
diff
changeset
|
290 -e '/PYTHON3_SO=/s/distutils\.//g' \ |
|
88c13f6dbc95
build: try 3.12 xapian build again.
John Rouillard <rouilj@ieee.org>
parents:
7627
diff
changeset
|
291 -e '/PYTHON3_SO=/s/"SO"/"EXT_SUFFIX"/g' \ |
|
88c13f6dbc95
build: try 3.12 xapian build again.
John Rouillard <rouilj@ieee.org>
parents:
7627
diff
changeset
|
292 -e '/PYTHON3_CACHE_TAG=/s/imp;print(imp.get_tag())/sys;print(sys.implementation.cache_tag)/' \ |
|
88c13f6dbc95
build: try 3.12 xapian build again.
John Rouillard <rouilj@ieee.org>
parents:
7627
diff
changeset
|
293 -e '/PYTHON3_CACHE_OPT1_EXT=/s/imp\.get_tag()/sys.implementation.cache_tag/g' \ |
|
7958
fffbaa3f963b
test: revert last commit it broke xapian build
John Rouillard <rouilj@ieee.org>
parents:
7957
diff
changeset
|
294 -e '/PYTHON3_CACHE_OPT1_EXT=/s/imp\b/importlib/g' \ |
|
7628
88c13f6dbc95
build: try 3.12 xapian build again.
John Rouillard <rouilj@ieee.org>
parents:
7627
diff
changeset
|
295 configure; \ |
|
7632
0334d371ea11
build: prevent diff from exiting shell script.
John Rouillard <rouilj@ieee.org>
parents:
7631
diff
changeset
|
296 diff -u configure.FCS configure || true; \ |
|
7628
88c13f6dbc95
build: try 3.12 xapian build again.
John Rouillard <rouilj@ieee.org>
parents:
7627
diff
changeset
|
297 ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; \ |
|
7629
bad8affdcba7
build: fix indent in yaml.
John Rouillard <rouilj@ieee.org>
parents:
7628
diff
changeset
|
298 fi |
|
8158
9fe279eef724
cleanup special case - xapian doesn't build in CI for 3.13 python
John Rouillard <rouilj@ieee.org>
parents:
8153
diff
changeset
|
299 make && sudo make install |
| 6867 | 300 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
301 - name: Test build roundup and install locale so lang tests work. |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
302 run: | |
| 6855 | 303 sudo apt-get install gettext |
|
6854
4f115313e262
install gettext for locale
John Rouillard <rouilj@ieee.org>
parents:
6853
diff
changeset
|
304 python setup.py build |
| 6840 | 305 (cd locale; make local_install; ls -lR locale/de/LC_MESSAGES) |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
306 |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
307 # Run the tests using pytest with test files in tests directory. |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
308 - name: Run tests |
| 6858 | 309 run: | |
|
6861
097578791f7b
mysql verbose and remove -u
John Rouillard <rouilj@ieee.org>
parents:
6860
diff
changeset
|
310 if [[ "$PYTHON_VERSION" != "2."* ]]; then |
| 6858 | 311 pytest -r a \ |
|
7169
5cbe5f2a636b
Add --durations=20 for detecting perf changes.
John Rouillard <rouilj@ieee.org>
parents:
7148
diff
changeset
|
312 --durations=20 \ |
| 6858 | 313 -W default \ |
| 314 -W "ignore:SelectableGroups:DeprecationWarning" \ | |
| 315 -W "ignore:the imp module:DeprecationWarning:gpg.gpgme:15" \ | |
| 316 -W "ignore:'U' mode::docutils.io" \ | |
| 317 -W "ignore:unclosed:ResourceWarning:roundup.roundup.demo" \ | |
| 318 -W "ignore:unclosed file:ResourceWarning:enum" \ | |
|
6952
4eea63155cff
enable all tests, make test job failure stil run final job.
John Rouillard <rouilj@ieee.org>
parents:
6951
diff
changeset
|
319 -v test/ --cov=roundup |
|
6951
31c56e8dfefb
3.6 python doesn't support lcov format either.
John Rouillard <rouilj@ieee.org>
parents:
6950
diff
changeset
|
320 coverage lcov |
| 6858 | 321 else |
| 322 # python2 case | |
|
7171
4e3abaa16296
add duration reporting for python2 as well.
John Rouillard <rouilj@ieee.org>
parents:
7169
diff
changeset
|
323 pytest -v -r a --durations=20 test/ --cov=roundup |
| 6858 | 324 fi |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
325 |
|
7742
b7a8d9664938
doc: fix build_docs test on travis and add to github ci
John Rouillard <rouilj@ieee.org>
parents:
7729
diff
changeset
|
326 - name: Build docs |
|
b7a8d9664938
doc: fix build_docs test on travis and add to github ci
John Rouillard <rouilj@ieee.org>
parents:
7729
diff
changeset
|
327 run: python ./setup.py build_doc |
|
b7a8d9664938
doc: fix build_docs test on travis and add to github ci
John Rouillard <rouilj@ieee.org>
parents:
7729
diff
changeset
|
328 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
329 - name: Upload coverage to Codecov |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
330 # see: https://github.com/codecov/codecov-action#usage |
|
8497
9d1fde7a4bea
build: bump codecov/codecov-action from 5.5.1 to 5.5.2 (PR #76)
John Rouillard <rouilj@ieee.org>
parents:
8495
diff
changeset
|
331 uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
332 with: |
|
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
333 verbose: true |
| 6881 | 334 token: ${{ secrets.CODECOV_TOKEN }} |
|
6839
6e1a82c3addb
Add GitHub Actions test workflow.
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
335 |
| 6945 | 336 - name: Upload coverage to Coveralls |
|
6951
31c56e8dfefb
3.6 python doesn't support lcov format either.
John Rouillard <rouilj@ieee.org>
parents:
6950
diff
changeset
|
337 # python 2.7 and 3.6 versions of coverage can't produce lcov files. |
|
31c56e8dfefb
3.6 python doesn't support lcov format either.
John Rouillard <rouilj@ieee.org>
parents:
6950
diff
changeset
|
338 if: matrix.python-version != '2.7' && matrix.python-version != '3.6' |
|
8481
9c7ac1aa68c9
chore: coveralls coverallsapp/github-action upgrade 2.3.6 to 2.3.7
John Rouillard <rouilj@ieee.org>
parents:
8479
diff
changeset
|
339 uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7 |
| 6945 | 340 with: |
| 341 github-token: ${{ secrets.GITHUB_TOKEN }} | |
|
6948
078073f7d207
coveralls for 3.x only, add paralle unique build key
John Rouillard <rouilj@ieee.org>
parents:
6947
diff
changeset
|
342 path-to-lcov: coverage.lcov |
|
078073f7d207
coveralls for 3.x only, add paralle unique build key
John Rouillard <rouilj@ieee.org>
parents:
6947
diff
changeset
|
343 parallel: run-{{ matrix.python-version }}-{{ matrix.os }} |
|
6943
3b081f5c8fc2
add coveralls as codecov is severly broken.
John Rouillard <rouilj@ieee.org>
parents:
6924
diff
changeset
|
344 |
| 6893 | 345 #- name: test docker build current version ubuntu-latest |
|
6904
92b64fd3341f
cleanup, comments ready for production.
John Rouillard <rouilj@ieee.org>
parents:
6903
diff
changeset
|
346 # if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' |
|
6880
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
347 # run: | |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
348 # docker build -t roundup-app-dev -f scripts/Docker/Dockerfile . |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
349 # mkdir tracker; chmod 777 tracker |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
350 # docker run -d --rm -p 9017:8080 \ |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
351 # -v $PWD/tracker:/usr/src/app/tracker \ |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
352 # roundup-app-dev:latest demo |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
353 # expect 200 |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
354 # curl --fail http://localhost:9017/demo/ > /dev/null |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
355 |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
356 #- name: test docker build released pip version |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
357 # run: | |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
358 # docker build -t roundup-app-rel --build-arg="source=pypi" \ |
|
222e84d12bed
schedule build 7PM on first of month; commented out docker tst
John Rouillard <rouilj@ieee.org>
parents:
6879
diff
changeset
|
359 # -f scripts/Docker/Dockerfile . |
|
6943
3b081f5c8fc2
add coveralls as codecov is severly broken.
John Rouillard <rouilj@ieee.org>
parents:
6924
diff
changeset
|
360 |
|
3b081f5c8fc2
add coveralls as codecov is severly broken.
John Rouillard <rouilj@ieee.org>
parents:
6924
diff
changeset
|
361 |
|
7871
30fcdf60da44
test: fix benchmark.py and set up to run under github if requested
John Rouillard <rouilj@ieee.org>
parents:
7857
diff
changeset
|
362 - name: run benchmarks |
|
30fcdf60da44
test: fix benchmark.py and set up to run under github if requested
John Rouillard <rouilj@ieee.org>
parents:
7857
diff
changeset
|
363 if: "contains(github.event.head_commit.message, 'benchmark')" |
|
7872
163d2c60fdf3
test: benchmark no progress when INCI defined; set path; signal handling
John Rouillard <rouilj@ieee.org>
parents:
7871
diff
changeset
|
364 run: INCI=1 python test/benchmark.py |
|
7871
30fcdf60da44
test: fix benchmark.py and set up to run under github if requested
John Rouillard <rouilj@ieee.org>
parents:
7857
diff
changeset
|
365 |
|
7390
399093a75afa
Run coveralls push only if all builds succeed.
John Rouillard <rouilj@ieee.org>
parents:
7274
diff
changeset
|
366 # in parallel build coveralls requires a finish step |
| 6945 | 367 finish: |
| 368 needs: test | |
| 369 runs-on: ubuntu-latest | |
|
7194
8dc5b3739367
Prevent github actions from running if commit includes 'no-github-ci'
John Rouillard <rouilj@ieee.org>
parents:
7187
diff
changeset
|
370 |
|
8dc5b3739367
Prevent github actions from running if commit includes 'no-github-ci'
John Rouillard <rouilj@ieee.org>
parents:
7187
diff
changeset
|
371 if: "!contains(github.event.head_commit.message, 'no-github-ci')" |
|
8dc5b3739367
Prevent github actions from running if commit includes 'no-github-ci'
John Rouillard <rouilj@ieee.org>
parents:
7187
diff
changeset
|
372 |
| 6945 | 373 steps: |
| 374 - name: Coveralls Finished | |
|
8481
9c7ac1aa68c9
chore: coveralls coverallsapp/github-action upgrade 2.3.6 to 2.3.7
John Rouillard <rouilj@ieee.org>
parents:
8479
diff
changeset
|
375 uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7 |
| 6945 | 376 with: |
| 377 github-token: ${{ secrets.github_token }} | |
| 378 parallel-finished: true |
