Skip to content

fixing composer

fixing composer #263

Workflow file for this run

name: ICAP
on: [ push, pull_request ]
env:
APP_NAME: files_antivirus
jobs:
clam:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4']
databases: ['sqlite']
server-versions: [ 'stable23' ]
name: icap-clmav
services:
clam:
image: deepdiver/icap-clamav-service
ports:
- 1344:1344
steps:
- name: Checkout server
uses: actions/checkout@v2
with:
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Checkout app
uses: actions/checkout@v2
with:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
- name: Set up PHPUnit
working-directory: apps/${{ env.APP_NAME }}
run: composer i
- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
./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
./occ app:enable --force ${{ env.APP_NAME }}
./occ config:system:set allow_local_remote_servers --type boolean --value true
- name: PHPUnit
working-directory: apps/${{ env.APP_NAME }}
env:
ICAP_HOST: localhost
ICAP_PORT: 1344
ICAP_REQUEST: avscan
ICAP_HEADER: X-Infection-Found
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml tests/Scanner/ICAPTest.php
kaspersky:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4']
databases: ['sqlite']
server-versions: [ 'stable23' ]
name: icap-kaspersky
services:
kaspersky:
image: ghcr.io/icewind1991/kaspersky-cap:latest
credentials:
username: icewind1991
password: ${{ secrets.ghcr_password }}
ports:
- 1344:1344
steps:
- name: Checkout server
uses: actions/checkout@v2
with:
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Checkout app
uses: actions/checkout@v2
with:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
- name: Set up PHPUnit
working-directory: apps/${{ env.APP_NAME }}
run: composer i
- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
./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
./occ app:enable --force ${{ env.APP_NAME }}
./occ config:system:set allow_local_remote_servers --type boolean --value true
- name: PHPUnit
working-directory: apps/${{ env.APP_NAME }}
env:
ICAP_HOST: localhost
ICAP_PORT: 1344
ICAP_REQUEST: req
ICAP_HEADER: X-Virus-ID
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml tests/Scanner/ICAPTest.php