Skip to content

Commit

Permalink
run NC from docker
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Neumann <[email protected]>
  • Loading branch information
individual-it committed Dec 13, 2022
1 parent 375d90b commit 4b49ee0
Showing 1 changed file with 50 additions and 22 deletions.
72 changes: 50 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,28 @@ jobs:
OPENPROJECT_AUTHENTICATION_GLOBAL__BASIC__AUTH_USER: apiadmin
OPENPROJECT_AUTHENTICATION_GLOBAL__BASIC__AUTH_PASSWORD: apiadmin

proxy:
image: ghcr.io/juliushaertl/nextcloud-dev-nginx:latest
ports:
- "80:80"
- "443:443"
env:
DHPARAM_BITS: 2048
DHPARAM_GENERATION: "false"
HTTPS_METHOD: "noredirect"
HSTS: "off"

nextcloud:
image: ghcr.io/juliushaertl/nextcloud-dev-php-81:latest
env:
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS: "viewer, activity"
VIRTUAL_HOST: "nextcloud"
NEXTCLOUD_TRUSTED_DOMAINS: nextcloud
ports:
- 8080:80


steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand Down Expand Up @@ -82,18 +104,18 @@ jobs:
- name: Install PHP Dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
git clone --depth 1 https://github.com/nextcloud/server.git -b ${{ matrix.nextcloudVersion }}
cd server && git submodule update --init
./occ maintenance:install --admin-pass=admin
# git clone --depth 1 https://github.com/nextcloud/server.git -b ${{ matrix.nextcloudVersion }}
# cd server && git submodule update --init
# ./occ maintenance:install --admin-pass=admin

- name: PHP stan
run: make phpstan

- name: PHP code style
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
# - name: PHP stan
# run: make phpstan
#
# - name: PHP code style
# run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

- name: Install NPM Dependencies
run: npm install
# - name: Install NPM Dependencies
# run: npm install

# - name: JS Lint
# run: npm run lint
Expand All @@ -106,18 +128,18 @@ jobs:
# make phpunit
# make jsunit

- name: API Tests
env:
NEXTCLOUD_BASE_URL: http://localhost:8080
run: |
git clone --depth 1 https://github.com/nextcloud/activity.git -b ${{ matrix.nextcloudVersion }} server/apps/activity
mkdir -p server/apps/integration_openproject
cp -r `ls -A | grep -v 'server'` server/apps/integration_openproject/
cd server
./occ a:e activity
./occ a:e integration_openproject
php -S localhost:8080 2> /dev/null &
cd apps/integration_openproject
# - name: API Tests
# env:
# NEXTCLOUD_BASE_URL: http://localhost:8080
# run: |
# git clone --depth 1 https://github.com/nextcloud/activity.git -b ${{ matrix.nextcloudVersion }} server/apps/activity
# mkdir -p server/apps/integration_openproject
# cp -r `ls -A | grep -v 'server'` server/apps/integration_openproject/
# cd server
# ./occ a:e activity
# ./occ a:e integration_openproject
# php -S localhost:8080 2> /dev/null &
# cd apps/integration_openproject
# make api-test

- name: wait on OpenProject
Expand All @@ -132,6 +154,12 @@ jobs:
- name: try Nextcloud
run: curl http://localhost:8080/status.php

- name: try Nextcloud2
run: curl http://nextcloud:8080/status.php

- name: try Nextcloud3
run: curl -k https://nextcloud:8080/status.php

- name: JS Code Coverage Summary Report
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' && matrix.phpVersion == '7.4' }}
uses: romeovs/[email protected]
Expand Down

0 comments on commit 4b49ee0

Please sign in to comment.