-
Notifications
You must be signed in to change notification settings - Fork 17
97 lines (90 loc) · 2.89 KB
/
server-ui-functional-test.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Server-UI functional test
on:
push:
paths:
- 'cypress-common/**'
- 'functional-test/**'
- 'ui/**'
- 'server/**'
- 'gradle/**'
- 'build.gradle'
- 'gradle.properties'
- 'settings.gradle'
- '.github/workflows/server-ui-functional-test.yml'
jobs:
assemble-and-functional-test:
runs-on: ubuntu-24.04
services:
database:
image: postgres:17.2-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: projektordb
TZ: UTC
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
objectstorage:
image: bitnami/minio:2020.12.29-debian-10-r17
ports:
- "9000:9000"
volumes:
- /tmp:/data
env:
MINIO_ACCESS_KEY: minio_access_key
MINIO_SECRET_KEY: minio_secret_key
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- name: Install Cypress dependencies # https://docs.cypress.io/app/get-started/install-cypress#UbuntuDebian
run: |
sudo apt-get update
sudo apt-get install libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb
- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn dependencies
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-all-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-all-yarn-
- name: Increase file watchers
run: |
sudo sysctl fs.inotify.max_user_watches=1048576
- name: ui install
run: |
cd ui
yarn install
- name: cypress-common install
run: |
cd cypress-common
yarn install
- name: functional-test install
run: |
cd functional-test
yarn install
- name: Run functional tests
env:
DB_URL: "jdbc:postgresql://localhost:5432/projektordb"
PROJEKTOR_TOKEN: ${{ secrets.PROJEKTOR_TOKEN }}
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
run: ./gradlew :functional-test:functionalTest