cicdupdate2

This commit is contained in:
kankys committed 2026-09-13 11:53:24 +02:00
1 parent ad362b635d
commit 8c539469f5
1 file changed
+8 -10
+8 -10
View File
@@ -1,6 +1,5 @@
name: Run Bruno API Tests name: Run Bruno API Tests
# Pipeline se spustí při každém pushnutí nebo Pull Requestu do hlavní větve
on: on:
push: push:
branches: [ "main", "master" ] branches: [ "main", "master" ]
@@ -12,28 +11,27 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# 1. Nastavíme Node 20 (aby nehlásily chybu novější balíčky v CI) # KRITICKÝ KROK: Stáhne váš kód z GitHubu do runneru
- name: Checkout repository code
uses: actions/checkout@v4
# Nastavení Node.js
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
# 2. Spuštění serveru na pozadí # Přechod do složky, instalace a spuštění 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) # Vyčkání na naběhnutí serveru na IPv4 (127.0.0.1)
- name: Wait for Backend server to be ready - name: Wait for Backend server to be ready
run: npx wait-on http://127.0.0.1:3000 -t 30000 run: npx wait-on http://127.0.0.1:3000 -t 30000
# 4. Vyčkání na port s časovým limitem (30 sekund) # Spuštění Bruno testů
- name: Wait for Backend server to be ready
run: npx wait-on http://localhost:3000 -t 30000
# 5. Krok: Spustí Bruno testy
# Pokud nepoužíváte environments, odeberte `--env název_prostředí`
- name: Run Bruno API Tests - name: Run Bruno API Tests
run: npx @usebruno/cli run apiTest --recursive run: npx @usebruno/cli run apiTest --recursive