Skip to content

Commit 133fc4c

Browse files
authored
Merge pull request #12 from Innmind/reuse-workflows
Reuse workflows
2 parents 98253f2 + 4791891 commit 133fc4c

File tree

2 files changed

+21
-66
lines changed

2 files changed

+21
-66
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,16 @@
11
name: CI
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
6-
phpunit:
7-
runs-on: ${{ matrix.os }}
8-
strategy:
9-
matrix:
10-
os: [ubuntu-latest, macOS-latest]
11-
php-version: ['8.2', '8.3']
12-
dependencies: ['lowest', 'highest']
13-
name: 'PHPUnit'
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
17-
- name: Setup PHP
18-
uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: ${{ matrix.php-version }}
21-
extensions: mbstring, intl
22-
coverage: xdebug
23-
- name: Composer
24-
uses: "ramsey/composer-install@v2"
25-
with:
26-
dependency-versions: ${{ matrix.dependencies }}
27-
- name: PHPUnit
28-
run: php blackbox.php
29-
env:
30-
ENABLE_COVERAGE: 'true'
31-
- uses: codecov/codecov-action@v1
32-
with:
33-
token: ${{ secrets.CODECOV_TOKEN }}
6+
blackbox:
7+
uses: innmind/github-workflows/.github/workflows/black-box-matrix.yml@main
8+
coverage:
9+
uses: innmind/github-workflows/.github/workflows/coverage-matrix.yml@main
10+
secrets: inherit
3411
psalm:
35-
runs-on: ubuntu-latest
36-
strategy:
37-
matrix:
38-
php-version: ['8.2', '8.3']
39-
dependencies: ['lowest', 'highest']
40-
name: 'Psalm'
41-
steps:
42-
- name: Checkout
43-
uses: actions/checkout@v2
44-
- name: Setup PHP
45-
uses: shivammathur/setup-php@v2
46-
with:
47-
php-version: ${{ matrix.php-version }}
48-
extensions: mbstring, intl
49-
- name: Composer
50-
uses: "ramsey/composer-install@v2"
51-
with:
52-
dependency-versions: ${{ matrix.dependencies }}
53-
- name: Psalm
54-
run: vendor/bin/psalm --shepherd
12+
uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main
5513
cs:
56-
runs-on: ubuntu-latest
57-
strategy:
58-
matrix:
59-
php-version: ['8.2']
60-
name: 'CS'
61-
steps:
62-
- name: Checkout
63-
uses: actions/checkout@v2
64-
- name: Setup PHP
65-
uses: shivammathur/setup-php@v2
66-
with:
67-
php-version: ${{ matrix.php-version }}
68-
extensions: mbstring, intl
69-
- name: Composer
70-
uses: "ramsey/composer-install@v2"
71-
- name: CS
72-
run: vendor/bin/php-cs-fixer fix --diff --dry-run
14+
uses: innmind/github-workflows/.github/workflows/cs.yml@main
15+
with:
16+
php-version: '8.2'

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
uses: innmind/github-workflows/.github/workflows/release.yml@main
11+
secrets: inherit

0 commit comments

Comments
 (0)