-
Notifications
You must be signed in to change notification settings - Fork 2
108 lines (105 loc) · 3.02 KB
/
build-and-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
98
99
100
101
102
103
104
105
106
107
108
name: Build and test
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
# kt_lint:
# name: Ktlint
# runs-on: ubuntu-22.04
# env:
# isCI: "true"
# steps:
# - name: Check out code
# uses: actions/checkout@v3
# - name: Set up JDK 21
# uses: actions/setup-java@v3
# with:
# distribution: adopt
# java-version: '21'
# - name: Ktlint
# run: ./gradlew ktlintCheck --no-daemon
ui_jvm_tests:
name: Jvm UI Compose tests
runs-on: ubuntu-22.04
env:
isCI: "true"
IN_MEMORY_DATABASE: 'true'
DB_USER: 'user'
WRITEOPIA_FIREBASE_ID: 'id'
WRITEOPIA_CLIENT_BASE_URL: "baseurl"
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '21'
- name: JVM tests
run: ./gradlew jvmTest --no-daemon
- name: upload results
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results-jvm
path: ./application/desktopApp/build/reports/
general_build:
name: General - Build debug
runs-on: ubuntu-22.04
env:
isCI: "true"
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '21'
- name: Build debug
run: ./gradlew assembleDebug test --no-daemon
backend_build_and_test:
name: Backend - build
runs-on: ubuntu-22.04
env:
isCI: "true"
IN_MEMORY_DATABASE: 'true'
DB_USER: 'user'
WRITEOPIA_FIREBASE_ID: 'id'
WRITEOPIA_CLIENT_BASE_URL: "baseurl"
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: '21'
- name: Build backend
run: ./gradlew backend:documents:documents_spring:assemble backend:editor:api_editor:assemble backend:editor:api_editor:test backend:editor:api_editor_socket:assemble backend:editor:api_editor_socket:test --no-daemon
- name: upload results
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results-backend
path: ./backend/editor/api_editor_spring/build/reports/
test_docusaurus:
name: Test docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: documentation/writeopia_docs/package-lock.json
- name: Install dependencies
working-directory: ./documentation/writeopia_docs
run: yarn install --frozen-lockfile
- name: Test build website
working-directory: ./documentation/writeopia_docs
run: yarn build