Skip to content

Commit 7992f67

Browse files
authored
Merge pull request #654 from franmomu/migrate_phpcs_to_ga
Migrate cs job to Github Actions
2 parents 8a0e1ab + cbeaf16 commit 7992f67

File tree

2 files changed

+46
-6
lines changed

2 files changed

+46
-6
lines changed
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Coding Standards"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "*.x"
7+
- "master"
8+
push:
9+
branches:
10+
- "*.x"
11+
- "master"
12+
13+
jobs:
14+
coding-standards:
15+
name: "Coding Standards"
16+
runs-on: "ubuntu-20.04"
17+
18+
strategy:
19+
matrix:
20+
php-version:
21+
- "7.4"
22+
23+
steps:
24+
- name: "Checkout"
25+
uses: "actions/checkout@v2"
26+
27+
- name: "Install PHP"
28+
uses: "shivammathur/setup-php@v2"
29+
with:
30+
coverage: "none"
31+
php-version: "${{ matrix.php-version }}"
32+
tools: "cs2pr"
33+
34+
- name: "Cache dependencies installed with Composer"
35+
uses: "actions/cache@v2"
36+
with:
37+
path: "~/.composer/cache"
38+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
39+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
40+
41+
- name: "Install dependencies with Composer"
42+
run: "composer install --no-interaction --no-progress --no-suggest"
43+
44+
# https://github.com/doctrine/.github/issues/3
45+
- name: "Run PHP_CodeSniffer"
46+
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"

.travis.yml

-6
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ jobs:
5555
if: type = cron
5656
env: DEV COMPOSER_FLAGS="-n --prefer-dist"
5757

58-
- stage: Code Quality
59-
env: CODING_STANDARDS
60-
php: 7.2
61-
script:
62-
- ./vendor/bin/phpcs
63-
6458
- stage: Coverage
6559
php: 7.3
6660
env: COVERAGE PHPUNIT_FLAGS="--coverage-clover=coverage.clover" REQUIRE_SYMFONY_MESSENGER

0 commit comments

Comments
 (0)