Skip to content

Commit 903db5f

Browse files
ci: run tests with rpm artifacts
Part of #198
1 parent e42997d commit 903db5f

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/packing.yml

+72
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,75 @@ jobs:
244244
run: |
245245
cat tarantool.log || true
246246
kill $(cat tarantool.pid) || true
247+
248+
run_tests_rpm_package_install_fedora:
249+
needs: pack_rpm
250+
251+
# We want to run on external PRs, but not on our own internal
252+
# PRs as they'll be run by the push to the branch.
253+
#
254+
# The main trick is described here:
255+
# https://github.com/Dart-Code/Dart-Code/pull/2375
256+
if: (github.event_name == 'push') ||
257+
(github.event_name == 'pull_request' &&
258+
github.event.pull_request.head.repo.full_name != github.repository)
259+
runs-on: ubuntu-20.04
260+
261+
container:
262+
image: ${{ matrix.os }}
263+
264+
strategy:
265+
fail-fast: false
266+
267+
matrix:
268+
os:
269+
- fedora:35
270+
- fedora:36
271+
tarantool:
272+
- '2.10.3'
273+
python: [ '3.10.7' ]
274+
package: [ python3-tarantool ]
275+
include:
276+
- os: fedora:36
277+
tarantool: '2.10.3'
278+
python: '3.6.15'
279+
package: python36-tarantool
280+
281+
steps:
282+
- name: Clone the connector repo
283+
uses: actions/checkout@v3
284+
285+
- name: Setup Python
286+
run: |
287+
dnf install -y wget zlib-devel
288+
wget https://www.python.org/ftp/python/${ matrix.python }/Python-${ matrix.python }.tar.xz
289+
tar -xvf Python-${ matrix.python }.tar.xz
290+
cd Python-${ matrix.python }
291+
./configure
292+
make
293+
make install
294+
295+
- name: Remove connector source code
296+
run: python3 .github/scripts/remove_source_code.py
297+
298+
- name: Install tarantool ${{ matrix.tarantool }}
299+
run: |
300+
curl -L https://tarantool.io/yeohchA/release/2/installer.sh | bash
301+
dnf install -y tarantool-${{ matrix.tarantool }}
302+
dnf install -y tarantool-devel-${{ matrix.tarantool }}
303+
304+
- name: Download rpm package artifact
305+
uses: actions/download-artifact@v3
306+
with:
307+
name: package_rpm
308+
309+
- name: Install the package from rpm artifacts
310+
run: dnf install -y RPMS/noarch/${ matrix.package }-*.noarch.rpm
311+
312+
- name: Install test requirements
313+
run: pip3 install -r requirements-test.txt
314+
315+
- name: Run tests
316+
run: python3 -m unittest discover -v
317+
env:
318+
TEST_PURE_INSTALL: true

0 commit comments

Comments
 (0)