Skip to content

Commit

Permalink
Switch to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tzurbaev committed Jan 6, 2021
1 parent aa1a4f4 commit ab67f26
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 1,951 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* text=auto

/.github export-ignore
/docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: run-tests

on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [7.2, 7.3, 7.4]

name: PHP${{ matrix.php }}

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

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

- name: Get Composer Cache Directory
id: get-composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup Cache
id: setup-cache
uses: actions/cache@v2
with:
path: ${{ steps.get-composer-cache.outputs.dir }}
key: composer-${{ matrix.php }}-${{ hashFiles('composer.json') }}

- name: Install dependencies
id: install-deps
run: composer install --no-interaction --prefer-dist --no-suggest

- name: Run tests
id: run-tests
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.phpunit.result.cache
/phpunit.xml
/.php_cs
composer.lock
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Laravel Forge API SDK

[![Build Status][ico-travis]][link-travis]
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/tzurbaev/laravel-forge-api/test?label=Tests)
[![StyleCI][ico-styleci]][link-styleci]
[![ScrutinizerCI][ico-scrutinizer]][link-scrutinizer]
[![Latest Version on Packagist][ico-version]][link-packagist]
Expand Down Expand Up @@ -155,12 +155,10 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio

[ico-version]: https://poser.pugx.org/tzurbaev/laravel-forge-api/version?format=flat
[ico-license]: https://poser.pugx.org/tzurbaev/laravel-forge-api/license?format=flat
[ico-travis]: https://api.travis-ci.org/tzurbaev/laravel-forge-api.svg?branch=master
[ico-styleci]: https://styleci.io/repos/84751490/shield?branch=master&style=flat
[ico-scrutinizer]: https://scrutinizer-ci.com/g/tzurbaev/laravel-forge-api/badges/quality-score.png?b=master

[link-packagist]: https://packagist.org/packages/tzurbaev/laravel-forge-api
[link-travis]: https://travis-ci.org/tzurbaev/laravel-forge-api
[link-styleci]: https://styleci.io/repos/84751490
[link-scrutinizer]: https://scrutinizer-ci.com/g/tzurbaev/laravel-forge-api/
[link-author]: https://github.com/tzurbaev
Loading

0 comments on commit ab67f26

Please sign in to comment.