Skip to content

Commit 72fd7e2

Browse files
committed
Move to GitHub Actions
1 parent 54e6a7b commit 72fd7e2

2 files changed

Lines changed: 88 additions & 35 deletions

File tree

.github/workflows/ci.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Continuous Integration
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
tests:
9+
strategy:
10+
matrix:
11+
include:
12+
- operating-system: 'ubuntu-latest'
13+
php-version: '7.1'
14+
15+
- operating-system: 'ubuntu-latest'
16+
php-version: '7.2'
17+
18+
- operating-system: 'ubuntu-latest'
19+
php-version: '7.3'
20+
21+
- operating-system: 'ubuntu-latest'
22+
php-version: '7.4'
23+
24+
- operating-system: 'ubuntu-latest'
25+
php-version: '8.0'
26+
27+
- operating-system: 'ubuntu-latest'
28+
php-version: '8.1'
29+
30+
- operating-system: 'windows-latest'
31+
php-version: '8.1'
32+
job-description: 'on Windows'
33+
34+
- operating-system: 'macos-latest'
35+
php-version: '8.1'
36+
job-description: 'on macOS'
37+
38+
name: PHP ${{ matrix.php-version }} ${{ matrix.job-description }}
39+
40+
runs-on: ${{ matrix.operating-system }}
41+
42+
steps:
43+
- name: Set git to use LF
44+
run: |
45+
git config --global core.autocrlf false
46+
git config --global core.eol lf
47+
48+
- name: Checkout code
49+
uses: actions/checkout@v2
50+
51+
- name: Setup PHP
52+
uses: shivammathur/setup-php@v2
53+
with:
54+
php-version: ${{ matrix.php-version }}
55+
extensions: fiber-amphp/ext-fiber@master
56+
57+
- name: Get Composer cache directory
58+
id: composer-cache
59+
run: echo "::set-output name=dir::$(composer config cache-dir)"
60+
61+
- name: Cache dependencies
62+
uses: actions/cache@v2
63+
with:
64+
path: ${{ steps.composer-cache.outputs.dir }}
65+
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}-${{ matrix.composer-flags }}
66+
restore-keys: |
67+
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}-
68+
composer-${{ runner.os }}-${{ matrix.php-version }}-
69+
composer-${{ runner.os }}-
70+
composer-
71+
72+
- name: Install dependencies
73+
uses: nick-invision/retry@v2
74+
with:
75+
timeout_minutes: 5
76+
max_attempts: 5
77+
retry_wait_seconds: 30
78+
command: |
79+
composer update --optimize-autoloader --no-interaction --no-progress ${{ matrix.composer-flags }}
80+
composer info -D
81+
82+
- name: Run tests
83+
run: vendor/bin/phpunit ${{ matrix.phpunit-flags }}
84+
85+
- name: Run style fixer
86+
env:
87+
PHP_CS_FIXER_IGNORE_ENV: 1
88+
run: vendor/bin/php-cs-fixer --diff --dry-run -v fix

.travis.yml

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

0 commit comments

Comments
 (0)