add smoke2: setup-go + npx + services
This commit is contained in:
1 parent
962cf102e1
commit
2bf9aa5eb5
1 file changed
+48
@@ -0,0 +1,48 @@
|
|||||||
|
name: smoke2
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
tools:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.25.x"
|
||||||
|
- name: go check
|
||||||
|
run: |
|
||||||
|
go version
|
||||||
|
echo "GOROOT=$(go env GOROOT)"
|
||||||
|
- name: npm check
|
||||||
|
run: |
|
||||||
|
npm --version
|
||||||
|
timeout 180 npx --yes cowsay@1.6.0 "npm-ok" || echo "NPM_FAILED"
|
||||||
|
|
||||||
|
svc:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:17-alpine
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: neoboard
|
||||||
|
POSTGRES_USER: neoboard
|
||||||
|
POSTGRES_PASSWORD: integration-test
|
||||||
|
ports:
|
||||||
|
- 5433:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd "pg_isready -U neoboard -d neoboard"
|
||||||
|
--health-interval 5s
|
||||||
|
--health-timeout 3s
|
||||||
|
--health-retries 20
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
ports:
|
||||||
|
- 6380:6379
|
||||||
|
steps:
|
||||||
|
- name: wait and probe
|
||||||
|
run: |
|
||||||
|
for i in $(seq 1 30); do
|
||||||
|
if bash -c 'echo > /dev/tcp/127.0.0.1/5433' 2>/dev/null; then echo "PG_UP after ${i}s"; break; fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
bash -c 'echo > /dev/tcp/127.0.0.1/5433' 2>/dev/null && echo "PG_REACHABLE" || echo "PG_UNREACHABLE"
|
||||||
|
bash -c 'echo > /dev/tcp/127.0.0.1/6380' 2>/dev/null && echo "REDIS_REACHABLE" || echo "REDIS_UNREACHABLE"
|
||||||
Reference in new issue
Block a user