-
Notifications
You must be signed in to change notification settings - Fork 827
78 lines (75 loc) · 2.35 KB
/
quality-assurance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
name: Quality Assurance
concurrency:
group: flysystem
cancel-in-progress: true
on:
push:
paths:
- src/**/*.php
- .github/workflows/quality-assurance.yml
branches:
- 3.x
pull_request:
paths:
- src/**/*.php
- .github/workflows/quality-assurance.yml
branches:
- 2.x
- 3.x
env:
FLYSYSTEM_AWS_S3_KEY: '${{ secrets.FLYSYSTEM_AWS_S3_KEY }}'
FLYSYSTEM_AWS_S3_SECRET: '${{ secrets.FLYSYSTEM_AWS_S3_SECRET }}'
FLYSYSTEM_AWS_S3_BUCKET: '${{ secrets.FLYSYSTEM_AWS_S3_BUCKET }}'
FLYSYSTEM_TEST_DANGEROUS_THINGS: "yes"
FLYSYSTEM_TEST_SFTP: "yes"
jobs:
phpunit:
name: PHPUnit tests on ${{ matrix.php }} ${{ matrix.composer-flags }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php: [ '8.0', '8.1' ]
composer-flags: [ '' ]
experimental: [false]
phpstan: [true]
phpunit-flags: [ '--coverage-text' ]
include:
- php: '8.0'
composer-flags: '--prefer-lowest'
experimental: false
phpstan: false
phpunit-flags: '--no-coverage'
- php: '8.2'
experimental: false
phpstan: false
phpunit-flags: '--no-coverage'
- php: '8.3'
experimental: false
phpstan: false
phpunit-flags: '--no-coverage'
steps:
- uses: actions/checkout@v3
- run: docker-compose -f docker-compose.yml up -d
- name: Start an SSH Agent
uses: frankdejonge/[email protected]
- run: chmod 0400 ./test_files/sftp/id_*
- id: ssh_agent
run: ssh-add ./test_files/sftp/id_rsa
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: composer:v2
- run: composer update --no-progress ${{ matrix.composer-flags }}
- run: php test_files/wait_for_sftp.php
- run: php test_files/wait_for_ftp.php 2121
- run: php test_files/wait_for_ftp.php 2122
- run: COMPOSER_OPTS='${{ matrix.composer-flags }}' vendor/bin/phpunit ${{ matrix.phpunit-flags }}
- run: vendor/bin/phpstan analyse
if: ${{ matrix.phpstan }}
- run: vendor/bin/php-cs-fixer fix --diff --dry-run
continue-on-error: true
if: ${{ matrix.php == '8.0' }}