Skip to content

Commit 9a42205

Browse files
committed
Added PHPCS and PHPSTAN to Github Action
1 parent c548ae2 commit 9a42205

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@ jobs:
2525
env:
2626
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727

28-
- name: Configure sysctl limits
29-
run: |
30-
sudo swapoff -a
31-
sudo sysctl -w vm.swappiness=1
32-
sudo sysctl -w fs.file-max=262144
33-
sudo sysctl -w vm.max_map_count=262144
34-
35-
- name: Runs Elasticsearch ${{ matrix.es-version }}
36-
uses: elastic/elastic-github-actions/elasticsearch@master
37-
with:
38-
stack-version: ${{ matrix.es-version }}
39-
4028
- name: Get composer cache directory
4129
id: composercache
4230
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
@@ -52,12 +40,32 @@ jobs:
5240
run: |
5341
composer install --prefer-dist
5442
43+
- name: PHP Coding Standards
44+
run: |
45+
composer run-script phpcs
46+
47+
- name: PHP Static Analysis Tool
48+
run: |
49+
composer run-script phpstan
50+
5551
- name: Unit tests
5652
run: |
5753
vendor/bin/phpunit -c phpunit.xml.dist
5854
env:
5955
TEST_SUITE: oss
6056

57+
- name: Configure sysctl limits
58+
run: |
59+
sudo swapoff -a
60+
sudo sysctl -w vm.swappiness=1
61+
sudo sysctl -w fs.file-max=262144
62+
sudo sysctl -w vm.max_map_count=262144
63+
64+
- name: Runs Elasticsearch ${{ matrix.es-version }}
65+
uses: elastic/elastic-github-actions/elasticsearch@master
66+
with:
67+
stack-version: ${{ matrix.es-version }}
68+
6169
- name: Integration tests
6270
run: |
6371
vendor/bin/phpunit -c phpunit-integration-tests.xml

0 commit comments

Comments
 (0)