Skip to content

Commit 8524f2c

Browse files
replace travis ci with more github ci
Signed-off-by: Robin Appelman <[email protected]> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
1 parent b05b2f8 commit 8524f2c

File tree

19 files changed

+3528
-754
lines changed

19 files changed

+3528
-754
lines changed

.github/workflows/lint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Php Lint
2+
on: [push, pull_request]
3+
4+
jobs:
5+
php-linters:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
php-versions: ['7.3', '7.4', '8.0']
10+
name: php${{ matrix.php-versions }} lint
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@master
14+
- name: Set up php${{ matrix.php-versons }}
15+
uses: shivammathur/setup-php@master
16+
with:
17+
php-version: ${{ matrix.php-versions }}
18+
coverage: none
19+
- name: Install dependencies
20+
run: composer i
21+
- name: Lint
22+
run: composer run lint
23+
24+
php-cs-fixer:
25+
name: php-cs check
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@master
30+
- name: Set up php${{ matrix.php-versions }}
31+
uses: shivammathur/setup-php@master
32+
with:
33+
php-version: 7.4
34+
tools: composer:v1
35+
coverage: none
36+
- name: Install dependencies
37+
run: composer i
38+
- name: Run coding standards check
39+
run: composer run cs:check

.github/workflows/nodejs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Node CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [15.x]
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- name: npm install, build
21+
run: |
22+
npm ci
23+
npm run build --if-present
24+
- name: check webpack build
25+
run: |
26+
bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && git status && exit 1 )"
27+
env:
28+
CI: true

.github/workflows/phpunit.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
name: PHPUnit
2+
on: [push, pull_request]
3+
4+
env:
5+
APP_NAME: logreader
6+
7+
jobs:
8+
php:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
# do not stop on another job's failure
13+
fail-fast: false
14+
matrix:
15+
php-versions: ['7.4', '8.0']
16+
databases: ['sqlite']
17+
server-versions: ['master']
18+
19+
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
20+
21+
steps:
22+
- name: Checkout server
23+
uses: actions/checkout@v2
24+
with:
25+
repository: nextcloud/server
26+
ref: ${{ matrix.server-versions }}
27+
28+
- name: Checkout submodules
29+
shell: bash
30+
run: |
31+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
32+
git submodule sync --recursive
33+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
34+
- name: Checkout app
35+
uses: actions/checkout@v2
36+
with:
37+
path: apps/${{ env.APP_NAME }}
38+
39+
- name: Set up php ${{ matrix.php-versions }}
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php-versions }}
43+
tools: phpunit
44+
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
45+
46+
- name: Set up PHPUnit
47+
working-directory: apps/${{ env.APP_NAME }}
48+
run: composer i
49+
50+
- name: Set up Nextcloud
51+
env:
52+
DB_PORT: 4444
53+
run: |
54+
mkdir data
55+
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
56+
./occ app:enable --force files_external
57+
./occ app:enable --force ${{ env.APP_NAME }}
58+
php -S localhost:8080 &
59+
- name: PHPUnit
60+
working-directory: apps/${{ env.APP_NAME }}
61+
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
62+
63+
mysql:
64+
runs-on: ubuntu-latest
65+
66+
strategy:
67+
# do not stop on another job's failure
68+
fail-fast: false
69+
matrix:
70+
php-versions: ['7.4']
71+
databases: ['mysql']
72+
server-versions: ['master']
73+
74+
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
75+
76+
services:
77+
mysql:
78+
image: mariadb
79+
ports:
80+
- 4444:3306/tcp
81+
env:
82+
MYSQL_ROOT_PASSWORD: rootpassword
83+
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5
84+
85+
steps:
86+
- name: Checkout server
87+
uses: actions/checkout@v2
88+
with:
89+
repository: nextcloud/server
90+
ref: ${{ matrix.server-versions }}
91+
92+
- name: Checkout submodules
93+
shell: bash
94+
run: |
95+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
96+
git submodule sync --recursive
97+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
98+
- name: Checkout app
99+
uses: actions/checkout@v2
100+
with:
101+
path: apps/${{ env.APP_NAME }}
102+
103+
- name: Set up php ${{ matrix.php-versions }}
104+
uses: shivammathur/setup-php@v2
105+
with:
106+
php-version: ${{ matrix.php-versions }}
107+
tools: phpunit
108+
extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql, zip, gd
109+
coverage: none
110+
111+
- name: Set up PHPUnit
112+
working-directory: apps/${{ env.APP_NAME }}
113+
run: composer i
114+
115+
- name: Set up Nextcloud
116+
env:
117+
DB_PORT: 4444
118+
run: |
119+
mkdir data
120+
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
121+
./occ app:enable --force files_external
122+
./occ app:enable --force ${{ env.APP_NAME }}
123+
php -S localhost:8080 &
124+
- name: PHPUnit
125+
working-directory: apps/${{ env.APP_NAME }}
126+
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
127+
128+
pgsql:
129+
runs-on: ubuntu-latest
130+
131+
strategy:
132+
# do not stop on another job's failure
133+
fail-fast: false
134+
matrix:
135+
php-versions: ['7.4']
136+
databases: ['pgsql']
137+
server-versions: ['master']
138+
139+
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
140+
141+
services:
142+
postgres:
143+
image: postgres
144+
ports:
145+
- 4444:5432/tcp
146+
env:
147+
POSTGRES_USER: root
148+
POSTGRES_PASSWORD: rootpassword
149+
POSTGRES_DB: nextcloud
150+
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
151+
152+
steps:
153+
- name: Checkout server
154+
uses: actions/checkout@v2
155+
with:
156+
repository: nextcloud/server
157+
ref: ${{ matrix.server-versions }}
158+
159+
- name: Checkout submodules
160+
shell: bash
161+
run: |
162+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
163+
git submodule sync --recursive
164+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
165+
- name: Checkout app
166+
uses: actions/checkout@v2
167+
with:
168+
path: apps/${{ env.APP_NAME }}
169+
170+
- name: Set up php ${{ matrix.php-versions }}
171+
uses: shivammathur/setup-php@v2
172+
with:
173+
php-version: ${{ matrix.php-versions }}
174+
tools: phpunit
175+
extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql, zip, gd
176+
coverage: none
177+
178+
- name: Set up PHPUnit
179+
working-directory: apps/${{ env.APP_NAME }}
180+
run: composer i
181+
182+
- name: Set up Nextcloud
183+
env:
184+
DB_PORT: 4444
185+
run: |
186+
mkdir data
187+
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
188+
./occ app:enable --force files_external
189+
./occ app:enable --force ${{ env.APP_NAME }}
190+
php -S localhost:8080 &
191+
- name: PHPUnit
192+
working-directory: apps/${{ env.APP_NAME }}
193+
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Php Static analysis
2+
on: [push, pull_request]
3+
4+
jobs:
5+
static-psalm-analysis:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
ocp-version: [ '20', 'dev-master' ]
10+
name: Nextcloud ${{ matrix.ocp-version }}
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@master
14+
- name: Set up php
15+
uses: shivammathur/setup-php@master
16+
with:
17+
php-version: 7.4
18+
tools: composer:v1
19+
coverage: none
20+
- name: Install dependencies
21+
run: composer i
22+
- name: Install dependencies
23+
run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }}
24+
- name: Run coding standards check
25+
run: composer run psalm

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
build/appstore/
3-
vendor
3+
vendor
4+
*.cache

.php_cs.dist

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
require_once './vendor/autoload.php';
6+
7+
use Nextcloud\CodingStandard\Config;
8+
9+
$config = new Config();
10+
$config
11+
->getFinder()
12+
->ignoreVCSIgnored(true)
13+
->notPath('build')
14+
->notPath('l10n')
15+
->notPath('lib/Vendor')
16+
->notPath('src')
17+
->notPath('vendor')
18+
->in(__DIR__);
19+
return $config;

.travis.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

build/main.css

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)