Skip to content

Commit

Permalink
add github action build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Nov 4, 2024
1 parent 227c2fb commit 1bbe26a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 34 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Build"

on:
pull_request:
push:
branches:
- master
- v*.*

env:
php-extensions: mbstring, intl
php-extensions-key: v1
php-tools: "composer:v2"

jobs:
checks:
name: Checks

runs-on: ubuntu-latest

strategy:
matrix:
php-version: [ '7.2', '8.1', '8.2', '8.3' ]

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

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

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist

- name: Run PHPStan
run: composer phpstan

- name: un Tests
run: composer tests
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

0 comments on commit 1bbe26a

Please sign in to comment.