-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (57 loc) · 1.42 KB
/
pr.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
name: PR Steps
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{github.workflows}}-${{github.ref}}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
container:
image: php:7.2-apache
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: install system packages
run: apt-get update && apt-get -y install zip git zlib1g-dev wget
-
name: Install PHP extensions
run: |
docker-php-ext-install pdo
docker-php-ext-install zip
-
name: Install Composer
run: |
php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --version=1.10.13
-
name: Display PHP Information
run: |
php -v
php composer.phar --version
-
name: Check PHP sintax
run: find . -name \*.php -exec php -l "{}" \;
-
name: Install project dependences
run:
php composer.phar install
sonar:
name: Sonar
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run Sonar
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}