-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (105 loc) · 3.25 KB
/
test-impact.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
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
name: Test Impact
# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
- '**'
tags-ignore:
- 'v*'
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
# Allow manually triggering the workflow.
workflow_dispatch:
jobs:
kill_previous:
name: 0️⃣ Kill previous runs
runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
execute_Lychee:
name: 1️⃣ PHP - Lychee
runs-on: ubuntu-latest
needs:
- kill_previous
steps:
- name: Extract branch name
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: extract_branch
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
tools: phpstan
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
with:
repository: 'LycheeOrg/Lychee'
- name: Fix composer.json
run: composer require --dev -W "lychee-org/phpstan-lychee":"dev-${{ steps.extract_branch.outputs.branch }}"
- name: Run PHPStan
run: vendor/bin/phpstan analyze
execute_php_exif:
name: 1️⃣ PHP - php-exif
runs-on: ubuntu-latest
needs:
- kill_previous
steps:
- name: Extract branch name
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: extract_branch
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
tools: phpstan
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
with:
repository: 'LycheeOrg/php-exif'
- name: Fix composer.json
run: composer require --dev -W "lychee-org/phpstan-lychee":"dev-${{ steps.extract_branch.outputs.branch }}"
- name: Run PHPStan
run: vendor/bin/phpstan analyze
execute_nested_sets:
name: 1️⃣ PHP - Nested sets
runs-on: ubuntu-latest
needs:
- kill_previous
steps:
- name: Extract branch name
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: extract_branch
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
tools: phpstan
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
with:
repository: 'LycheeOrg/laravel-nestedset'
- name: Fix composer.json
run: |
composer require --dev "lychee-org/phpstan-lychee":"dev-${{ steps.extract_branch.outputs.branch }}"
- name: Run PHPStan
run: vendor/bin/phpstan analyze