Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move remaining CI to Github actions #358

Merged
merged 1 commit into from
Jan 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build
on: pull_request

jobs:
build-js:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 13, 14, 15 ]
name: Build front-end with Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
- name: run tests
run: npm run build
env:
CI: true
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:

strategy:
matrix:
php-versions: ['7.3', '7.4']
php-versions: [ '7.3', '7.4', '8.0' ]

name: php${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v2
Expand All @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
node-versions: [12.x]
node-versions: [ 14.x ]

name: node${{ matrix.node-versions }}
steps:
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Test
on: pull_request

jobs:
smoke-test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [7.3, 7.4, 8.0]
nextcloud-versions: ['master']
db: ['sqlite', 'mysql', 'pgsql']
name: Nextcloud ${{ matrix.nextcloud-versions }} and php${{ matrix.php-versions }} smoke test
services:
mysql-service:
image: mariadb:10
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 }}
tools: composer:v1
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip
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 app
uses: actions/checkout@master
with:
path: nextcloud/apps/recommendations
- name: Install dependencies
working-directory: nextcloud/apps/recommendations
run: composer install
- name: Install app
run: php -f nextcloud/occ app:enable recommendations
- name: Install app
run: php -f nextcloud/occ app:enable recommendations
- name: Run a smoke test
run: php -f nextcloud/occ files:recommendations:recommend admin
65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/Command/GetRecommendations.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function execute(InputInterface $input, OutputInterface $output) {
return 1;
}

if ($input->hasArgument('max')) {
if ($input->getArgument('max')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not there anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is, but hasArgument always return true for a defined argument 🤷

$recommendations = $this->recommendationService->getRecommendations($user, (int) $input->getArgument('max'));
} else {
$recommendations = $this->recommendationService->getRecommendations($user);
Expand Down