Skip to content

Commit a3f2600

Browse files
author
Brice Mangeat
committed
feat/add-continuous-integration
1 parent cbbeafa commit a3f2600

File tree

3 files changed

+57
-23
lines changed

3 files changed

+57
-23
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
11+
continuous-integration:
12+
name: "Continuous Integration"
13+
14+
runs-on: "ubuntu-latest"
15+
16+
strategy:
17+
matrix:
18+
install-args: ['', '--prefer-lowest']
19+
php-version: ['7.4', '8.0', '8.1']
20+
fail-fast: false
21+
22+
steps:
23+
# Cancel previous runs of the same branch
24+
- name: cancel
25+
uses: styfle/[email protected]
26+
with:
27+
access_token: ${{ github.token }}
28+
29+
- name: "Checkout"
30+
uses: "actions/checkout@v3"
31+
32+
- name: "Install PHP with extensions"
33+
uses: "shivammathur/setup-php@v2"
34+
with:
35+
coverage: "xdebug"
36+
php-version: "${{ matrix.php-version }}"
37+
tools: composer:v2
38+
39+
- name: composer-cache-dir
40+
id: composercache
41+
run: |
42+
echo "::set-output name=dir::$(composer config cache-files-dir)"
43+
- name: composer-cache
44+
uses: actions/cache@v3
45+
with:
46+
path: ${{ steps.composercache.outputs.dir }}
47+
key: composer-${{ hashFiles('**/composer.json') }}-${{ matrix.install-args }}
48+
restore-keys: |
49+
composer-${{ hashFiles('**/composer.json') }}-${{ matrix.install-args }}
50+
composer-${{ hashFiles('**/composer.json') }}-
51+
composer-
52+
- name: "Install dependencies with composer"
53+
run: |
54+
composer update ${{ matrix.install-args }} --no-interaction --no-progress --prefer-dist
55+
- name: "Run tests with phpunit/phpunit"
56+
run: "vendor/bin/phpunit"

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Latest Stable Version](https://poser.pugx.org/thecodingmachine/graphqlite-laravel/v/stable)](https://packagist.org/packages/thecodingmachine/graphqlite-laravel)
22
[![Latest Unstable Version](https://poser.pugx.org/thecodingmachine/graphqlite-laravel/v/unstable)](https://packagist.org/packages/thecodingmachine/graphqlite-laravel)
33
[![License](https://poser.pugx.org/thecodingmachine/graphqlite-laravel/license)](https://packagist.org/packages/thecodingmachine/graphqlite-laravel)
4-
[![Build Status](https://travis-ci.org/thecodingmachine/graphqlite-laravel.svg?branch=master)](https://travis-ci.org/thecodingmachine/graphqlite-laravel)
4+
[![Build Status](https://github.com/thecodingmachine/graphqlite/workflows/Continuous%20Integration/badge.svg)](https://github.com/thecodingmachine/graphqlite/actions)
55

66

77
Laravel GraphQLite bindings

0 commit comments

Comments
 (0)