Skip to content

Commit

Permalink
ISSUE-70: Add Github action(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlOfSoup committed Mar 2, 2024
1 parent 5ad2a9f commit f801838
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 36 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [7.2, 7.4, 8.2]
include:
- php-version: 8.2
dist: jammy
env:
SYMFONY_VERSION: ~5.4
exclude:
- php-version: 7.2
dist: jammy
- php-version: 7.4
dist: jammy
fail-fast: true

steps:
- uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:1.10.22

- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: $HOME/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: |
if [ "${{ matrix.env.SYMFONY_VERSION }}" != "" ]; then composer require "symfony/symfony:${{ matrix.env.SYMFONY_VERSION }}" --no-update; fi;
COMPOSER_MEMORY_LIMIT=-1 composer install
- name: Setup Codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
- name: Run Rector
run: vendor/bin/rector process --dry-run --no-progress-bar --ansi

- name: Run PHPStan
run: vendor/bin/phpstan analyze --no-progress --ansi

- name: Run PHPUnit tests
run: XDEBUG_MODE=coverage php vendor/bin/phpunit

- name: Upload coverage to Codecov
run: ./codecov
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

0 comments on commit f801838

Please sign in to comment.