-
Notifications
You must be signed in to change notification settings - Fork 827
87 lines (84 loc) · 2.59 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
78
79
80
81
82
83
84
85
86
---
name: Quality Assurance
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
paths:
- src/**/*.php
- .github/workflows/quality-assurance.yml
branches:
- 3.x
- 4.x
pull_request:
paths:
- src/**/*.php
- .github/workflows/quality-assurance.yml
branches:
- 3.x
- 4.x
schedule:
- cron: "5 1 * * *"
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 }}'
MONGODB_URI: 'mongodb://127.0.0.1:27017/'
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'
- php: '8.4'
experimental: true
phpstan: false
phpunit-flags: '--no-coverage'
steps:
- uses: actions/checkout@v4
- 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 }}
extensions: mongodb
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' }}