Skip to content

Commit 8b30b5b

Browse files
committed
Update test steps
1 parent 426bbd7 commit 8b30b5b

1 file changed

Lines changed: 20 additions & 25 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,44 +38,37 @@ jobs:
3838
ports:
3939
- 5432:5432
4040
options: >-
41+
--name madlib
4142
--ulimit core=-1
4243
--privileged
4344
4445
steps:
4546
- uses: actions/checkout@v4
46-
47-
- name: Set up Python
48-
uses: actions/setup-python@v4
49-
with:
50-
python-version: '3.x'
51-
47+
48+
- name: Configure PostgreSQL
49+
cp tool/pg_hba.conf.postgres /etc/postgresql/15/main/pg_hba.conf
50+
echo " * soft nproc unlimited" > tee /etc/security/limits.d/postgres-limits.conf
51+
service postgresql start
52+
5253
- name: Install Python dependencies
5354
run: |
54-
python -m pip install --upgrade pip
55+
apt-get update
56+
apt-get install -y python3-pip
5557
pip install mock pandas numpy xgboost scikit-learn pyyaml pyxb-x pypmml
5658
57-
- name: Set up build environment
59+
- name: Install Java for pypmml
5860
run: |
59-
sudo apt-get update
60-
sudo apt-get install -y \
61-
build-essential \
62-
cmake \
63-
openjdk-11-jre-headless \
64-
postgresql-15
61+
apt-get install -y \
62+
openjdk-11-jre-headless
6563
66-
# Configure PostgreSQL
67-
sudo cp tool/pg_hba.conf.postgres /etc/postgresql/15/main/pg_hba.conf
68-
echo "* soft nproc unlimited" | sudo tee /etc/security/limits.d/postgres-limits.conf
69-
sudo service postgresql start
70-
7164
- name: Build MADlib
7265
run: |
73-
mkdir build
74-
cd build
75-
cmake ..
66+
mkdir -p build
67+
cd build && cmake ..
7668
make -j$(nproc)
77-
sudo make install
69+
make install
7870
make package
71+
chown -R postgres:postgres /build
7972
8073
- name: Run Tests
8174
run: |
@@ -86,6 +79,9 @@ jobs:
8679
src/bin/madpack -s mad -p postgres -c postgres/postgres@localhost:5432/postgres install
8780
8881
mkdir -p /tmp
82+
83+
# Run dev-check
84+
src/bin/madpack -s mad -p postgres -c postgres/postgres@localhost:5432/postgres -d /tmp dev-check
8985
9086
# Remove known problematic test files (as done in jenkins_build.sh)
9187
rm -rf src/ports/postgres/modules/deep_learning/test
@@ -97,8 +93,7 @@ jobs:
9793
rm -rf src/ports/postgres/modules/mxgboost/test/madlib_xgboost.sql_in
9894
rm -rf src/ports/postgres/modules/kmeans/test/kmeans.sql_in
9995
100-
# Run tests
101-
src/bin/madpack -s mad -p postgres -c postgres/postgres@localhost:5432/postgres -d /tmp dev-check
96+
# Run unit tests
10297
src/bin/madpack -s mad -p postgres -c postgres/postgres@localhost:5432/postgres -d /tmp unit-test
10398
10499
- name: Process Test Results

0 commit comments

Comments
 (0)