-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (83 loc) · 2.35 KB
/
setup-nextcloud.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
name: Nextcloud setup
on:
push:
paths:
- '**setup-nextcloud**'
- 'package.json'
- 'package-lock.json'
- 'node_modules/**'
pull_request:
paths:
- '**setup-nextcloud-app**'
- 'package.json'
- 'package-lock.json'
- 'node_modules/**'
env:
POSTGRES_PASSWORD: nc_test_db
MYSQL_USER: nc_test
MYSQL_PASSWORD: nc_test_db
MYSQL_DATABASE: nc_test
jobs:
setup-nextcloud:
runs-on: ubuntu-latest
strategy:
matrix:
database: ['sqlite', 'pgsql', 'mysql']
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
FILENAME: ".revision"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/[email protected]
with:
php-version: '8.2'
- name: Setup mysql
if: matrix.database == 'mysql'
uses: getong/[email protected]
with:
host port: 3800
mysql database: ${{ env.MYSQL_DATABASE }}
mysql root password: ${{ env.MYSQL_PASSWORD }}
mysql user: ${{ env.MYSQL_USER }}
mysql password: ${{ env.MYSQL_PASSWORD }}
mariadb version: '10.5'
- name: Script test
if: matrix.database == 'mysql'
uses: ./setup-nextcloud/
with:
version: 'stable27'
cron: true
database-type: ${{ matrix.database }}
database-host: 127.0.0.1
database-port: 3800
database-name: ${{ env.MYSQL_DATABASE }}
database-user: root
database-password: ${{ env.MYSQL_PASSWORD }}
- name: Script test
if: matrix.database != 'mysql'
uses: ./setup-nextcloud/
with:
version: 'stable27'
cron: true
database-type: ${{ matrix.database }}
database-host: localhost
database-port: 5432
database-name: postgres
database-user: postgres
database-password: ${{ env.POSTGRES_PASSWORD }}
- name: Test setup
run: cd ../server && ./occ maintenance:mode --on