-
Notifications
You must be signed in to change notification settings - Fork 3
124 lines (108 loc) · 4.46 KB
/
Copy pathci.yml
File metadata and controls
124 lines (108 loc) · 4.46 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: CI
on:
push:
pull_request:
jobs:
check_composer:
name: Check composer.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.3'
- run: composer validate --strict --no-check-lock
static_analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.3'
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction
- run: vendor/bin/phpstan analyze
coding_standards:
name: Coding standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.3'
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction
- run: vendor/bin/php-cs-fixer fix --dry-run --show-progress=dots --no-interaction
check_generated_output:
name: Generated output not changed
needs: [coding_standards]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.3'
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction
- name: Regenerate
run: ./generate --all
- name: Assert up-to-date
uses: tj-actions/verify-changed-files@v20
with:
fail-if-changed: 'true'
fail-message: "Generated files don't match the manifest files. Make sure to run `./generate --all` to regenerate the code from the manifest."
tests:
name: "Tests on PHP ${{ matrix.php }}${{ matrix.name_suffix }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.2', '8.3' ]
min_stability: [ '' ]
name_suffix: [ '' ]
composer_flags: [ '' ]
include:
- php: '8.3'
min_stability: 'dev'
name_suffix: ' (dev deps)'
- php: '8.1'
min_stability: ''
name_suffix: ' (lowest deps)'
composer_flags: '--prefer-lowest'
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php }}"
- name: Configure stability
if: "matrix.min_stability != ''"
run: composer config minimum-stability "${{ matrix.min_stability }}"
- name: Remove async-aws/code-generator # The code generator requires PHP 8.2+
run: composer remove --no-interaction --dev --no-update async-aws/code-generator
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction ${{ matrix.composer_flags }}
- name: Run tests
run: vendor/bin/phpunit --colors=always --exclude-group=integration
integration_tests:
name: "Integration tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "8.3"
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction
- name: Run tests
run: vendor/bin/phpunit --colors=always --group=integration --display-skipped
env:
AMAZON_INCENTIVES_ACCESS_KEY: ${{ secrets.AMAZON_INCENTIVES_ACCESS_KEY }}
AMAZON_INCENTIVES_PARTNER_ID: ${{ secrets.AMAZON_INCENTIVES_PARTNER_ID }}
AMAZON_INCENTIVES_SECRET_KEY: ${{ secrets.AMAZON_INCENTIVES_SECRET_KEY }}