mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
github ci
This commit is contained in:
parent
58f6df3807
commit
80a4edf0ef
9 changed files with 144 additions and 6 deletions
70
.github/workflows/ci.yaml
vendored
Normal file
70
.github/workflows/ci.yaml
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
on: [push, pull_request]
|
||||
|
||||
name: CI
|
||||
|
||||
jobs:
|
||||
php-cs-fixer:
|
||||
name: PHP-CS-Fixer
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.0'
|
||||
extensions: apcu
|
||||
- name: PHP-CS-Fixer
|
||||
uses: OskarStark/php-cs-fixer-ga@2.16.7
|
||||
with:
|
||||
args: --diff --dry-run --allow-risky yes --stop-on-violation --using-cache=no --path-mode=intersection
|
||||
|
||||
phpstan:
|
||||
name: PHPStan Static Analysis
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.0'
|
||||
extensions: apcu, smbclient
|
||||
- name: Composer
|
||||
run: composer install
|
||||
- env:
|
||||
BACKEND: smbclient
|
||||
run: php ./vendor/bin/phpstan analyse --level 1 src
|
||||
|
||||
phpunit:
|
||||
runs-on: ubuntu-20.04
|
||||
name: Unit tests
|
||||
|
||||
services:
|
||||
samba:
|
||||
image: dperson/samba
|
||||
env:
|
||||
USER: "test;test"
|
||||
SHARE: "test;/tmp;yes;no;yes;all;none"
|
||||
ports:
|
||||
- 139:139
|
||||
- 445:445
|
||||
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get install smbclient
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.0'
|
||||
extensions: apcu, smbclient
|
||||
- name: Composer
|
||||
run: composer install
|
||||
- name: Config
|
||||
run: |
|
||||
echo '{"host": "localhost","user": "test","password": "test","share": "test","root": ""}' > tests/config.json
|
||||
- name: PHPUnit Tests
|
||||
env:
|
||||
BACKEND: smbclient
|
||||
run: php ./vendor/bin/phpunit tests
|
||||
Loading…
Add table
Add a link
Reference in a new issue