-
Notifications
You must be signed in to change notification settings - Fork 65
40 lines (31 loc) · 1.28 KB
/
build-lint-test.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
name: PHP Build, Lint
on:
push:
jobs:
build-test-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout xero-php repo
uses: actions/checkout@v4
with:
repository: XeroAPI/xero-php-oauth2
path: xero-php-oauth2
- name: Setup PHP
run: sudo apt-get install -y php php-mbstring php-intl php-xml php-zip php-curl
- name: Install Composer
run: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"
- name: Install Dependencies
run: composer install
working-directory: xero-php-oauth2
- name: Check for Vulnerabilities
run: composer audit
working-directory: xero-php-oauth2
- name: Check for Outdated Packages
run: composer outdated
working-directory: xero-php-oauth2
- name: Validate PHP Syntax
run: find . -path ./vendor -prune -o -name "*.php" -exec php -l {} \; > /dev/null || exit 1
working-directory: xero-php-oauth2