-
-
Notifications
You must be signed in to change notification settings - Fork 174
145 lines (125 loc) Β· 3.83 KB
/
floccus.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
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Floccus
on:
pull_request:
push:
branches:
- master
- stable*
paths:
- 'lib/**'
env:
APP_NAME: bookmarks
permissions:
contents: read
concurrency:
group: bookmarks-floccus-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
php:
runs-on: ubuntu-latest
env:
SELENIUM_HUB_HOST: hub
TEST_HOST: nextcloud
SERVER_BRANCH: ${{ matrix.server-versions }}
SELENIUM_VERSION: 3
MYSQL_PASSWORD: root
strategy:
# do not stop on another job's failure
fail-fast: false
matrix:
floccus-ref: ['master', 'develop']
node-versions: [14.x]
npm-versions: [7.x]
server-versions: ['26']
selenium-version: ['3']
floccus-adapter:
- nextcloud-bookmarks
test-name:
- 'test'
browsers: ['firefox']
name: floccus@${{matrix.floccus-ref}} ${{matrix.floccus-adapter}}:${{ matrix.test-name}} ${{matrix.browsers}} nc@${{matrix.server-versions}}
services:
hub:
image: selenium/hub:3
ports:
- 4444:4444
firefox:
image: selenium/node-firefox:3
env:
HUB_HOST: hub
HUB_PORT: 4444
options: --shm-size="2g"
nextcloud:
image: nextcloud:${{ matrix.server-versions }}
env:
NEXTCLOUD_ADMIN_USER: admin
NEXTCLOUD_ADMIN_PASSWORD: admin
MYSQL_DATABASE: nextcloud
MYSQL_USER: root
MYSQL_PASSWORD: ${{env.MYSQL_PASSWORD}}
MYSQL_HOST: mysql
NEXTCLOUD_TRUSTED_DOMAINS: nextcloud
volumes:
- /home/runner/work/bookmarks/bookmarks/apps:/var/www/html/custom_apps
options: --name nextcloud
mysql:
image: mariadb:10.5
env:
MYSQL_ROOT_PASSWORD: ${{env.MYSQL_PASSWORD}}
steps:
- name: Checkout floccus
uses: actions/checkout@v2
with:
repository: marcelklehr/floccus
ref: ${{matrix.floccus-ref}}
path: floccus
- name: Checkout bookmarks app
uses: actions/checkout@v2
with:
path: ${{ env.APP_NAME }}
if: matrix.floccus-adapter == 'nextcloud-bookmarks'
- name: Install bookmarks app
shell: bash
run: |
cd ${{ env.APP_NAME }}
composer install --ignore-platform-req=php --no-dev
if: matrix.floccus-adapter == 'nextcloud-bookmarks'
- name: Enable bookmarks app
shell: bash
run: |
sudo cp -R ${{ env.APP_NAME }} apps/
NEXT_WAIT_TIME=0
until [ $NEXT_WAIT_TIME -eq 25 ] || docker exec --user www-data nextcloud php occ app:enable ${{ env.APP_NAME }}; do
sleep $(( NEXT_WAIT_TIME++ ))
done
[ $NEXT_WAIT_TIME -lt 25 ]
if: matrix.floccus-adapter == 'nextcloud-bookmarks'
- name: List apps
shell: bash
run: |
docker exec --user www-data nextcloud php occ app:list
- name: Enable APCu
run: |
docker exec --user www-data nextcloud php occ config:system:set --value "\\OC\\Memcache\\APCu" memcache.local
if: matrix.floccus-adapter != 'fake'
- name: Set up node ${{ matrix.node-versions }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-versions }}
- name: Install npm
shell: bash
run: |
npm install -g npm@${{ matrix.npm-versions }}
- name: Install dependencies & build
working-directory: floccus
run: |
npm ci
npm run build-release --if-present
- name: Run tests
working-directory: floccus
env:
SELENIUM_BROWSER: ${{ matrix.browsers }}
FLOCCUS_TEST: ${{matrix.floccus-adapter}} ${{ matrix.test-name}}
GIST_TOKEN: "foo"
run: |
npm run test