1
1
on :
2
2
push :
3
3
branches :
4
- - main
5
- - release/*
4
+ - main
5
+ - release/*
6
6
7
7
jobs :
8
-
9
- npm_test :
8
+ npm_test_build :
10
9
runs-on : ubuntu-latest
11
10
12
11
steps :
13
- - name : Checkout
14
- uses : actions/checkout@v2
15
- - name : Setup Node.js
16
- uses : actions/setup-node@v2-beta
17
- with :
18
- node-version : ' 12'
19
- check-latest : true
20
- - name : Install NPM dependencies
21
- run : npm ci
22
- - name : Test NPM compilation
23
- run : npm run prod
24
-
25
- php_db_test :
12
+ - name : Checkout
13
+ uses : actions/checkout@v2
14
+
15
+ - name : Setup Node.js
16
+ uses : actions/setup-node@v2-beta
17
+ with :
18
+ node-version : " 12"
19
+ check-latest : true
20
+
21
+ - name : Cache node modules
22
+ uses : actions/cache@v4
23
+ id : cache
24
+ env :
25
+ cache-name : cache-node-modules
26
+ with :
27
+ path : node_modules
28
+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
29
+ restore-keys : |
30
+ ${{ runner.os }}-build-${{ env.cache-name }}-
31
+ ${{ runner.os }}-build-
32
+ ${{ runner.os }}-
33
+
34
+ - name : Install NPM dependencies
35
+ run : npm ci
36
+
37
+ # - name: Run tests
38
+ # run: npm test
39
+
40
+ - name : Test NPM compilation
41
+ run : npm run prod
42
+
43
+ php_test_build :
26
44
runs-on : ubuntu-latest
27
45
container :
28
46
image : kirschbaumdevelopment/laravel-test-runner:7.4
@@ -33,41 +51,64 @@ jobs:
33
51
DB_HOST : mysql
34
52
DB_USERNAME : root
35
53
QUEUE_CONNECTION : database
36
-
54
+
55
+ steps :
56
+ - name : Checkout code
57
+ uses : actions/checkout@v1
58
+ with :
59
+ fetch-depth : 1
60
+
61
+ # - name: Cache PHP dependencies
62
+ # uses: actions/cache@v4
63
+ # id: vendor-cache
64
+ # with:
65
+ # path: vendor
66
+ # key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
67
+
68
+ - name : Install composer dependencies
69
+ run : |
70
+ composer install --no-scripts
71
+
72
+ - name : Prepare Laravel Application
73
+ run : |
74
+ rm -rf bootstrap/cache/*
75
+ cp .env.example .env
76
+ cp db.env.example db.env
77
+ rm -rf database/database.sqlite
78
+ touch database/database.sqlite
79
+ php artisan config:clear
80
+ php artisan cache:clear
81
+ php artisan route:clear
82
+ php artisan view:clear
83
+ php artisan key:generate
84
+ php artisan config:cache
85
+ php artisan route:cache
86
+
87
+ - name : Prepare Database
88
+ run : |
89
+ php artisan migrate
90
+ php artisan db:seed
91
+ php artisan migrate:refresh
92
+ php artisan db:seed
93
+
94
+ - name : Run Testsuite
95
+ run : |
96
+ php artisan generate:jwt-keypair
97
+ vendor/phpunit/phpunit/phpunit tests/ --colors=never --configuration phpunit_gitlab.xml
98
+
99
+ helm-build :
100
+ runs-on : ubuntu-latest
101
+ needs : [npm_test_build, php_test_build]
102
+ permissions :
103
+ contents : write
104
+
37
105
steps :
106
+ - name : Checkout
107
+ uses : actions/checkout@v4
108
+ with :
109
+ fetch-depth : 0
38
110
39
- - name : Checkout code
40
- uses : actions/checkout@v1
41
- with :
42
- fetch-depth : 1
43
-
44
- - name : Install composer dependencies
45
- run : |
46
- composer install --no-scripts
47
-
48
- - name : Prepare Laravel Application
49
- run : |
50
- rm -rf bootstrap/cache/*
51
- cp .env.example .env
52
- cp db.env.example db.env
53
- rm -rf database/database.sqlite
54
- touch database/database.sqlite
55
- php artisan config:clear
56
- php artisan cache:clear
57
- php artisan route:clear
58
- php artisan view:clear
59
- php artisan key:generate
60
- php artisan config:cache
61
- php artisan route:cache
62
-
63
- - name : Prepare Database
64
- run : |
65
- php artisan migrate
66
- php artisan db:seed
67
- php artisan migrate:refresh
68
- php artisan db:seed
69
-
70
- - name : Run Testsuite
71
- run : |
72
- php artisan generate:jwt-keypair
73
- vendor/phpunit/phpunit/phpunit tests/ --colors=never --configuration phpunit_gitlab.xml
111
+ - name : Run chart-releaser
112
+ uses : helm/chart-releaser-action@v1.7.0
113
+ env :
114
+ CR_TOKEN : " ${{ secrets.GH_TOKEN }}"
0 commit comments