Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from signifly/topic/github-actions
Browse files Browse the repository at this point in the history
added github actions
  • Loading branch information
pactode authored Nov 1, 2020
2 parents 0557e94 + 431b216 commit 65fd5b9
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 19 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check & fix styling

on: [push]

jobs:
style:
runs-on: ubuntu-latest

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

- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs --allow-risky=yes

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Commit changes
uses: stefanzweifel/[email protected]
with:
commit_message: Fix styling
branch: ${{ steps.extract_branch.outputs.branch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Tests

on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [7.4]
laravel: [8.*, 7.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

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

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: |
composer config --global --auth http-basic.repo.packagist.com token ${{ secrets.COMPOSER_TOKEN }}
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
18 changes: 0 additions & 18 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
@@ -1,7 +1,7 @@
# A set of useful Laravel builder macros

[![Latest Version on Packagist](https://img.shields.io/packagist/v/signifly/laravel-builder-macros.svg?style=flat-square)](https://packagist.org/packages/signifly/laravel-builder-macros)
[![Build Status](https://img.shields.io/travis/signifly/laravel-builder-macros/master.svg?style=flat-square)](https://travis-ci.org/signifly/laravel-builder-macros)
![Tests](https://github.com/signifly/laravel-janitor/workflows/Tests/badge.svg)
[![StyleCI](https://styleci.io/repos/144017418/shield?branch=master)](https://styleci.io/repos/144017418)
[![Quality Score](https://img.shields.io/scrutinizer/g/signifly/laravel-builder-macros.svg?style=flat-square)](https://scrutinizer-ci.com/g/signifly/laravel-builder-macros)
[![Total Downloads](https://img.shields.io/packagist/dt/signifly/laravel-builder-macros.svg?style=flat-square)](https://packagist.org/packages/signifly/laravel-builder-macros)
Expand Down

0 comments on commit 65fd5b9

Please sign in to comment.