Skip to content

Commit 59de914

Browse files
authored
Merge pull request #192 from localheinz/feature/small
Enhancement: Install root dependencies using GitHub Actions
2 parents 424b7fd + cc45609 commit 59de914

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Continuous Integration"
4+
5+
on:
6+
- "pull_request"
7+
- "push"
8+
9+
jobs:
10+
continuous-integratio:
11+
name: "Continuous Integration"
12+
13+
runs-on: "ubuntu-latest"
14+
15+
strategy:
16+
matrix:
17+
php-version:
18+
- "7.2"
19+
- "7.3"
20+
21+
dependencies:
22+
- "highest"
23+
24+
steps:
25+
- name: "Checkout"
26+
uses: "actions/[email protected]"
27+
28+
- name: "Install PHP with extensions"
29+
uses: "shivammathur/[email protected]"
30+
with:
31+
coverage: "none"
32+
php-version: "${{ matrix.php-version }}"
33+
34+
- name: "Cache dependencies installed with composer"
35+
uses: "actions/[email protected]"
36+
with:
37+
path: "~/.composer/cache"
38+
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
39+
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
40+
41+
- name: "Install dependencies with composer in root directory"
42+
run: "composer install --no-interaction --no-progress --no-suggest"

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Latest Unstable Version](https://poser.pugx.org/thecodingmachine/safe/v/unstable.svg)](https://packagist.org/packages/thecodingmachine/safe)
44
[![License](https://poser.pugx.org/thecodingmachine/safe/license.svg)](https://packagist.org/packages/thecodingmachine/safe)
55
[![Build Status](https://travis-ci.org/thecodingmachine/safe.svg?branch=master)](https://travis-ci.org/thecodingmachine/safe)
6+
[![Continuous Integration](https://github.com/thecodingmachine/safe/workflows/Continuous%20Integration/badge.svg)](https://github.com/thecodingmachine/safe/actions)
67
[![Coverage Status](https://coveralls.io/repos/thecodingmachine/safe/badge.svg?branch=master&service=github)](https://coveralls.io/github/thecodingmachine/safe?branch=master)
78

89
Safe PHP
@@ -59,7 +60,7 @@ $content = file_get_contents('foobar.json');
5960
$foobar = json_decode($content);
6061
```
6162

62-
All PHP functions that can return `false` on error are part of Safe.
63+
All PHP functions that can return `false` on error are part of Safe.
6364
In addition, Safe also provide 2 'Safe' classes: `Safe\DateTime` and `Safe\DateTimeImmutable` whose methods will throw exceptions instead of returning false.
6465

6566
## PHPStan integration
@@ -159,8 +160,8 @@ try {
159160

160161
Safe is loading 1000+ functions from ~85 files on each request. Yet, the performance impact of this loading is quite low.
161162

162-
In case you worry, using Safe will "cost" you ~700µs on each request. The [performance section](performance/README.md)
163-
contains more information regarding the way we tested the performance impact of Safe.
163+
In case you worry, using Safe will "cost" you ~700µs on each request. The [performance section](performance/README.md)
164+
contains more information regarding the way we tested the performance impact of Safe.
164165

165166
## Learn more
166167

0 commit comments

Comments
 (0)