mirror of
https://github.com/LukasKanka/api_test.git
synced 2026-11-11 22:34:36 +01:00
cicdupdate1
This commit is contained in:
1 parent
153b20c68c
commit
ad362b635d
1 file changed
+7
-7
@@ -12,23 +12,23 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 1. Krok: Stáhne kód z repozitáře do virtuálního prostředí runneru
|
# 1. Nastavíme Node 20 (aby nehlásily chybu novější balíčky v CI)
|
||||||
- name: Checkout repository code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# 2. Nastavení správné verze Node.js (18 místo 20)
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
|
|
||||||
# 3. Spuštění serveru přímo přes node (přeskakujeme nodemon)
|
# 2. Spuštění serveru na pozadí
|
||||||
- name: Install dependencies and start Backend
|
- name: Install dependencies and start Backend
|
||||||
run: |
|
run: |
|
||||||
cd web/backend
|
cd web/backend
|
||||||
npm install
|
npm install
|
||||||
node app.js &
|
node app.js &
|
||||||
|
|
||||||
|
# 3. Vyčkání přímo na IPv4 adresy (127.0.0.1 místo localhost)
|
||||||
|
- name: Wait for Backend server to be ready
|
||||||
|
run: npx wait-on http://127.0.0.1:3000 -t 30000
|
||||||
|
|
||||||
# 4. Vyčkání na port s časovým limitem (30 sekund)
|
# 4. Vyčkání na port s časovým limitem (30 sekund)
|
||||||
- name: Wait for Backend server to be ready
|
- name: Wait for Backend server to be ready
|
||||||
run: npx wait-on http://localhost:3000 -t 30000
|
run: npx wait-on http://localhost:3000 -t 30000
|
||||||
|
|||||||
Reference in new issue
Block a user