Skip to content

Commit 1701f43

Browse files
Merge pull request #415 from nextcloud/add-oci-github-action
Add OCI github action
2 parents d785355 + eb1280a commit 1701f43

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/oci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: PHPUnit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- stable*
9+
10+
env:
11+
APP_NAME: logreader
12+
13+
jobs:
14+
oci:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
# do not stop on another job's failure
19+
fail-fast: false
20+
matrix:
21+
php-versions: ['7.4']
22+
databases: ['oci']
23+
server-versions: ['master']
24+
25+
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
26+
27+
services:
28+
oracle:
29+
image: deepdiver/docker-oracle-xe-11g # "wnameless/oracle-xe-11g-r2"
30+
ports:
31+
- "1521:1521"
32+
33+
steps:
34+
- name: Checkout server
35+
uses: actions/checkout@v2
36+
with:
37+
repository: nextcloud/server
38+
ref: ${{ matrix.server-versions }}
39+
40+
- name: Checkout submodules
41+
shell: bash
42+
run: |
43+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
44+
git submodule sync --recursive
45+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
46+
47+
- name: Checkout app
48+
uses: actions/checkout@v2
49+
with:
50+
path: apps/${{ env.APP_NAME }}
51+
52+
- name: Set up PHPUnit
53+
working-directory: apps/${{ env.APP_NAME }}
54+
run: composer i
55+
56+
- name: Set up php ${{ matrix.php-versions }}
57+
uses: "shivammathur/setup-php@v2"
58+
with:
59+
php-version: "${{ matrix.php-versions }}"
60+
extensions: mbstring, iconv, fileinfo, intl, oci8
61+
tools: phpunit:8.5.2
62+
coverage: none
63+
64+
- name: Set up Nextcloud
65+
run: |
66+
mkdir data
67+
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=1521 --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
68+
php -f index.php
69+
./occ app:enable --force ${{ env.APP_NAME }}
70+
71+
- name: PHPUnit
72+
working-directory: apps/${{ env.APP_NAME }}/tests
73+
run: phpunit -c phpunit.xml

0 commit comments

Comments
 (0)