Skip to content

Commit 4f590b4

Browse files
Issue (#1): Initial Commit.
1 parent 45641cd commit 4f590b4

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Comprehensive Testing
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '0 2 * * *' # Daily at 2 AM UTC
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
services:
16+
postgres:
17+
image: postgres:17
18+
env:
19+
POSTGRES_PASSWORD: postgres
20+
POSTGRES_DB: testdb
21+
options: >-
22+
--health-cmd pg_isready
23+
--health-interval 10s
24+
--health-timeout 5s
25+
--health-retries 5
26+
ports:
27+
- 5432:5432
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Install dependencies
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y \
37+
postgresql-17 \
38+
postgresql-server-dev-17 \
39+
postgresql-client-17 \
40+
build-essential \
41+
make \
42+
gcc \
43+
libc6-dev \
44+
pkg-config \
45+
libpq-dev \
46+
valgrind \
47+
cppcheck
48+
49+
- name: Build all components
50+
run: |
51+
make all
52+
53+
- name: Install pgraft extension
54+
run: |
55+
cd pgraft
56+
sudo make install
57+
58+
- name: Run comprehensive tests
59+
run: |
60+
./.circleci/test.sh
61+
62+
- name: Run memory analysis
63+
run: |
64+
cd pgraft
65+
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt make test 2>&1 || true
66+
67+
- name: Run static analysis
68+
run: |
69+
cppcheck --enable=all --inconclusive --std=c99 --suppress=missingIncludeSystem pgraft/src/ ramd/src/ ramctrl/src/ 2>&1 || true
70+
71+
- name: Upload test artifacts
72+
uses: actions/upload-artifact@v4
73+
if: always()
74+
with:
75+
name: test-results
76+
path: |
77+
pgraft/valgrind-out.txt
78+
*/test-results.txt

0 commit comments

Comments
 (0)