-
Notifications
You must be signed in to change notification settings - Fork 25
79 lines (76 loc) · 2.59 KB
/
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
name: Test
on: pull_request
jobs:
frontend-unit-test:
runs-on: ubuntu-latest
name: Front-end unit tests
steps:
- uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install
run: npm install
- name: run tests
run: npm run test
env:
CI: true
smoke-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1' ]
nextcloud-versions: [ 'master' ]
db: [ 'mysql', 'pgsql' ]
name: Nextcloud${{ matrix.nextcloud-versions }}-${{ matrix.db }} smoke test
services:
mysql-service:
image: mariadb:10.3
env:
MYSQL_ROOT_PASSWORD: my-secret-pw
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: nextcloud
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
postgres-service:
image: postgres
env:
POSTGRES_USER: nextcloud
POSTGRES_DB: nextcloud
POSTGRES_PASSWORD: nextcloud
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,xml,zip,gmp
coverage: xdebug
- name: Checkout Nextcloud
run: git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloud-versions }} nextcloud
- name: Install Nextcloud
run: php -f nextcloud/occ maintenance:install --database-host 127.0.0.1 --database-name nextcloud --database-user nextcloud --database-pass nextcloud --admin-user admin --admin-pass admin --database ${{ matrix.db }}
- name: Checkout the app
uses: actions/checkout@master
with:
path: nextcloud/apps/suspicious_login
- name: Install dependencies
working-directory: nextcloud/apps/suspicious_login
run: composer install
- name: Install the app
run: php -f nextcloud/occ app:enable suspicious_login
- name: Configure Nextcloud for testing
run: php -f nextcloud/occ config:system:set debug --type bool --value true