-
Notifications
You must be signed in to change notification settings - Fork 136
93 lines (79 loc) · 2.67 KB
/
node.js.yml
File metadata and controls
93 lines (79 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22, 24]
firebird: [3, 4, 5]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 10
- name: Setup FirebirdSQL ${{ matrix.firebird }} container
run: |
# Create data directory
sudo mkdir -p /firebird/data
sudo chmod 755 /firebird/data
# Start Firebird container
docker run -d \
--name firebird \
-e FIREBIRD_ROOT_PASSWORD="masterkey" \
-e FIREBIRD_CONF_WireCrypt="Enabled" \
-e FIREBIRD_CONF_AuthServer="Legacy_Auth;Srp;Win_Sspi" \
-p 3050:3050 \
-v /firebird/data:/firebird/data \
firebirdsql/firebird:${{ matrix.firebird }}
# Wait for Firebird to be ready
MAX_RETRIES=30
RETRY_INTERVAL=2
echo "Waiting for Firebird to start..."
FIREBIRD_READY=false
for i in $(seq 1 $MAX_RETRIES); do
if docker exec firebird /opt/firebird/bin/isql -user SYSDBA -password masterkey -z 2>&1 | grep -q "ISQL Version"; then
echo "Firebird is ready!"
FIREBIRD_READY=true
break
fi
echo "Waiting... ($i/$MAX_RETRIES)"
sleep $RETRY_INTERVAL
done
if [ "$FIREBIRD_READY" = false ]; then
echo "ERROR: Firebird failed to start within the timeout period"
docker ps -a
docker logs firebird
exit 1
fi
# Verify Firebird is running
docker ps -a
docker logs firebird
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Build
shell: bash
run: |
npm ci
- name: Test (Linux)
run: |
export FIREBIRD_DATA=/firebird/data
npm test
- name: Show Firebird log on failure
if: failure()
run: |
echo "=========================================="
echo "Firebird Server Log (last 100 lines):"
echo "=========================================="
docker exec firebird tail -n 100 /firebird/log/firebird.log || echo "Could not read firebird.log"
echo ""
echo "=========================================="
echo "Docker container status:"
echo "=========================================="
docker ps -a
echo ""
echo "=========================================="
echo "Docker container logs:"
echo "=========================================="
docker logs firebird --tail 50