Skip to content

Commit

Permalink
ci: updated GA build job (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
SVillette authored Mar 9, 2022
1 parent 95870af commit 6b93835
Showing 1 changed file with 40 additions and 30 deletions.
70 changes: 40 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
name: Build

on:
push:
pull_request:
push:
pull_request:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: php-actions/composer@v6
with:
php_version: 8.0

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run-script test
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 7.4
- 8.0
- 8.1

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install Dependencies
run: composer install --no-interaction --no-progress

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run-script test

0 comments on commit 6b93835

Please sign in to comment.