-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (124 loc) · 4.39 KB
/
behat-sqlite.yml
File metadata and controls
145 lines (124 loc) · 4.39 KB
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
# SPDX-FileCopyrightText: 2026 LibreCode Coop and LibreCode contributors
#
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Behat SQLite
on:
pull_request:
permissions:
contents: read
concurrency:
group: behat-sqlite-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
src: ${{ steps.changes.outputs.src }}
steps:
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/behat*'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
behat-sqlite:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.src != 'false'
timeout-minutes: 45
env:
APP_NAME: profile_fields
services:
mailpit:
image: axllent/mailpit:v1.27
ports:
- 1025:1025
- 8025:8025
name: SQLite PHP 8.2 Nextcloud master
steps:
- name: Checkout server
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: master
- name: Checkout app
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
path: apps/${{ env.APP_NAME }}
- name: Set up php 8.2
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: '8.2'
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, sockets, sqlite, pdo_sqlite, xmlreader, xmlwriter, zip, zlib
coverage: none
ini-file: development
ini-values: disable_functions=
- name: Install app dependencies
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer install --no-dev
composer --working-dir=tests/integration install
- name: Set up Nextcloud
run: |
echo "127.0.0.1 mailpit" | sudo tee -a /etc/hosts
mkdir data
./occ maintenance:install \
--verbose \
--database=sqlite \
--database-name=nextcloud \
--admin-user admin \
--admin-pass admin
./occ app:enable --force ${{ env.APP_NAME }}
git clone --depth 1 https://github.com/nextcloud/notifications apps/notifications
composer --working-dir=apps/notifications install --no-dev
./occ app:enable --force notifications
git clone --depth 1 https://github.com/nextcloud/spreed apps/spreed
composer --working-dir=apps/spreed install --no-dev
./occ app:enable --force spreed
./occ config:system:set auth.bruteforce.protection.enabled --value false --type boolean
./occ config:system:set ratelimit.protection.enabled --value false --type boolean
./occ config:system:set debug --value true --type boolean
- name: Run Behat
working-directory: apps/${{ env.APP_NAME }}/tests/integration
env:
BEHAT_ROOT_DIR: ../../../../
BEHAT_RUN_AS: runner
BEHAT_VERBOSE: ${{ runner.debug }}
run: composer run behat
- name: Upload Behat results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: behat-results
path: apps/${{ env.APP_NAME }}/tests/integration/output/
retention-days: 30
- name: Print logs
if: always()
run: cat data/nextcloud.log 2>/dev/null || true
summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [changes, behat-sqlite]
if: always()
name: behat-sqlite-summary
steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.behat-sqlite.result != 'success' }}; then exit 1; fi