-
-
Notifications
You must be signed in to change notification settings - Fork 2
132 lines (125 loc) · 3.67 KB
/
default.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Default
on:
push:
branches-ignore:
- master
- crowdin
jobs:
check-gradle-version:
name: Check Gradle version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: madhead/check-gradle-version@v1
continue-on-error: true
unit-test:
name: Unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
with:
arguments: check jacocoTestReport
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
retention-days: 1
path: |
**/build/reports
**/build/test-results
**/build/jacoco
db-test:
name: DB test
runs-on: ubuntu-latest
env:
POSTGRES_HOST: localhost
POSTGRES_USER: tyzenhaus
POSTGRES_PASSWORD: tyzenhaus
POSTGRES_PORT: 5432
POSTGRES_DB: tyzenhaus
services:
postgres:
image: postgres:14
ports:
- 5432:5432
env:
POSTGRES_USER: ${{env.POSTGRES_USER}}
POSTGRES_PASSWORD: ${{env.POSTGRES_PASSWORD}}
POSTGRES_DB: ${{env.POSTGRES_DB}}
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
with:
arguments: :repository:postgresql:liquibaseUpdate
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
env:
DATABASE_URL: postgres://${{env.POSTGRES_USER}}:${{env.POSTGRES_PASSWORD}}@${{env.POSTGRES_HOST}}:${{env.POSTGRES_PORT}}/${{env.POSTGRES_DB}}
- run: psql -h ${{env.POSTGRES_HOST}} -U ${{env.POSTGRES_USER}} -d ${{env.POSTGRES_DB}} <repository/postgresql/src/test/sql/seed.sql
- uses: gradle/gradle-build-action@v2
with:
arguments: dbTest jacocoDbTestReport
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
env:
DATABASE_URL: postgres://${{env.POSTGRES_USER}}:${{env.POSTGRES_PASSWORD}}@${{env.POSTGRES_HOST}}:${{env.POSTGRES_PORT}}/${{env.POSTGRES_DB}}
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
retention-days: 1
path: |
**/build/reports
**/build/test-results
**/build/jacoco
mini-app-test:
name: Mini App test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: 'mini-app/.nvmrc'
- run: yarn install
working-directory: mini-app
- run: yarn run build
working-directory: mini-app
test-publish:
name: Publish test results
runs-on: ubuntu-latest
needs:
- unit-test
- db-test
- mini-app-test
if: always()
steps:
- uses: actions/download-artifact@v3
with:
name: test-results
- uses: mikepenz/action-junit-report@v3
with:
report_paths: '**/test-results/**/TEST-*.xml'
codecov:
name: CodeCov
runs-on: ubuntu-latest
needs:
- unit-test
- db-test
- mini-app-test
if: always()
steps:
- uses: actions/download-artifact@v3
with:
name: test-results
- run: bash <(curl -s https://codecov.io/bash)