-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (33 loc) · 1.12 KB
/
Copy pathversion_command.yaml
File metadata and controls
40 lines (33 loc) · 1.12 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
name: Version Command
# verifies https://github.com/easy-coding-standard/ecs-src/issues/8
# the published, scoped + downgraded package must keep a working "ecs --version",
# which prints the bundled PHP-CS-Fixer version
on:
pull_request:
push:
branches:
- main
tags:
- '*'
schedule:
# weekly, to catch a broken published release even without a new tag
- cron: '0 6 * * 1'
jobs:
version_command:
runs-on: ubuntu-latest
steps:
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: none
- run: mkdir nested-dir
- run: composer require symplify/easy-coding-standard --ansi
working-directory: nested-dir
-
name: "ecs --version must print the PHP-CS-Fixer line"
working-directory: nested-dir
run: |
OUTPUT="$(vendor/bin/ecs --version --ansi)"
echo "$OUTPUT"
echo "$OUTPUT" | grep -q 'PHP-CS-Fixer'