Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PETOSS-530 - Create Github Workflow for PHP SDK to Build and Lint #370

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PHP Build, Lint

on:
push:

vigneshk-tw marked this conversation as resolved.
Show resolved Hide resolved
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: Validate PHP Syntax
run: find . -path ./vendor -prune -o -name "*.php" -exec php -l {} \; > /dev/null || exit 1
working-directory: xero-php-oauth2