Skip to content

fixing composer

fixing composer #331

Workflow file for this run

name: Kaspersky
on: [ push, pull_request ]
env:
APP_NAME: files_antivirus
jobs:
php:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4']
databases: ['sqlite']
server-versions: [ 'stable23' ]
name: kaspersky
services:
kaspersky:
image: ghcr.io/icewind1991/kaspersky:latest
credentials:
username: icewind1991
password: ${{ secrets.ghcr_password }}
ports:
- 1234:80
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:
KASPERSKY_HOST: localhost
KASPERSKY_PORT: 1234
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml tests/Scanner/ExternalKasperskyTest.php