Skip to content

Commit 8283284

Browse files
authored
Add workflow to also run tests on a Debian container (twmht#9)
This runs tests against Debian stable (bullseye), and testing (bookworm).
2 parents a2ecab7 + daefdf4 commit 8283284

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
name: 'Build'
33

44
on:
5+
pull_request:
56
push:
7+
branches:
8+
- 'main'
9+
- 'force_ci/all/**' # For development, forcing all workflows to run.
10+
- 'force_ci/build/**' # For debugging and/or only forcing this workflow.
611

712
jobs:
813
# Build the RocksDB C library and cache the result.

.github/workflows/debian.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: debian
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'main'
8+
- 'force_ci/all/**' # For development, forcing all workflows to run.
9+
- 'force_ci/debian/**' # For debugging and/or only forcing this workflow.
10+
11+
jobs:
12+
debian-build:
13+
name: ${{ matrix.dist }}
14+
runs-on: ubuntu-latest
15+
container: debian:${{ matrix.dist }}-slim
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
dist: [bullseye, bookworm]
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Install build-dependencies
24+
# TODO(dato): find out why setup.py links to compression libraries
25+
# by hand (and hence their development packages needed here).
26+
run: |
27+
apt-get update
28+
apt-get install --no-install-recommends -y \
29+
build-essential librocksdb-dev cython3 \
30+
python3-dev python3-pip python3-pytest \
31+
libsnappy-dev libbz2-dev liblz4-dev libz-dev
32+
33+
- name: Symlink pytest
34+
run: |
35+
ln -s /usr/bin/pytest-3 /usr/local/bin/pytest
36+
37+
- name: Build pyrocksdb
38+
run: |
39+
python3 -m pip install '.[test]'
40+
41+
- name: Run tests
42+
run: |
43+
pytest --pyargs rocksdb

0 commit comments

Comments
 (0)