forked from zazukoians/qlever-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.79 KB
/
test.yaml
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
name: E2E Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: "npm"
node-version: lts/*
# Test Build of Docker images
- name: Build Docker images (local)
run: docker compose --profile local build
# Test:
# - if the stack is able to be started
# - if a user is able to perform a basic SPARQL query
- name: Start Docker stack (local)
run: docker compose --profile local up -d
- name: Wait for services to be ready
run: sleep 10
- name: Show current state of Docker stack (local)
run: docker compose --profile local ps
- name: Show server logs (local)
run: docker compose --profile local logs server-local
- name: Show UI logs (local)
run: docker compose --profile local logs ui-local
- name: Check endpoint using cURL
run: 'curl -s -X POST -H "Content-Type: application/sparql-query" -d "SELECT * WHERE { ?s ?p ?o } LIMIT 1" http://localhost:7001/'
- name: Check UI using cURL
run: "curl -vvv -L http://localhost:7002/"
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 7
- name: Stop Docker stack (local)
run: docker compose --profile local down