Skip to content

Commit

Permalink
ci: migrate to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JaZo committed Mar 24, 2023
1 parent effbf0d commit eae134d
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 24 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Run tests

on: [ push, pull_request ]

jobs:
php-tests:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0', '8.1' ]
laravel: [ '6.*', '7.*', '8.*', '9.*' ]
stability: [ prefer-stable ]
exclude:
- laravel: '6.*'
php: '8.1'
- laravel: '7.*'
php: '8.1'
- laravel: '9.*'
php: '7.4'

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}

steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-composer-${{ matrix.stability }}-${{ hashFiles('**/composer.json') }}
restore-keys: php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-composer-${{ matrix.stability }}-

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Latest Version on Packagist](https://img.shields.io/packagist/v/swisnl/carwash.svg?style=flat-square)](https://packagist.org/packages/swisnl/carwash)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/swisnl/carwash/master.svg?style=flat-square)](https://travis-ci.org/swisnl/carwash)
[![Build Status](https://img.shields.io/github/actions/workflow/status/swisnl/carwash/tests.yml?label=tests&branch=master&style=flat-square)](https://github.com/swisnl/carwash/actions/workflows/tests.yml)

**Carwash** is a data scrubbing utility for **Laravel** applications

Expand Down

0 comments on commit eae134d

Please sign in to comment.