mirror of
https://github.com/LukasKanka/api_test.git
synced 2026-11-11 06:34:36 +01:00
38 lines
945 B
YAML
38 lines
945 B
YAML
name: Run Bruno API Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main", "master" ]
|
|
pull_request:
|
|
branches: [ "main", "master" ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# 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
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
# Přechod do složky, instalace a spuštění na pozadí
|
|
- name: Install dependencies and start Backend
|
|
run: |
|
|
cd web/backend
|
|
npm install
|
|
node app.js &
|
|
|
|
# Vyčkání na naběhnutí serveru na IPv4 (127.0.0.1)
|
|
- name: Wait for Backend server to be ready
|
|
run: npx wait-on http://127.0.0.1:3000 -t 30000
|
|
|
|
# Spuštění Bruno testů
|
|
- name: Run Bruno API Tests
|
|
run: npx @usebruno/cli run apiTest --recursive
|