Skip to content

Commit 1623fe6

Browse files
committed
Init github action
1 parent 733fb58 commit 1623fe6

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# @link https://github.com/JBZoo/SimpleTypes
1212
#
1313

14+
/.github export-ignore
1415
/.phan export-ignore
1516
/build export-ignore
1617
/tests export-ignore

.github/workflows/main.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#
2+
# JBZoo Toolbox - SimpleTypes
3+
#
4+
# This file is part of the JBZoo Toolbox project.
5+
# For the full copyright and license information, please view the LICENSE
6+
# file that was distributed with this source code.
7+
#
8+
# @package SimpleTypes
9+
# @license MIT
10+
# @copyright Copyright (C) JBZoo.com, All rights reserved.
11+
# @link https://github.com/JBZoo/SimpleTypes
12+
#
13+
14+
name: Continuous Integration
15+
16+
on:
17+
pull_request:
18+
branches:
19+
- "*"
20+
push:
21+
branches:
22+
- 'master'
23+
schedule:
24+
- cron: '15 */8 * * *'
25+
26+
env:
27+
COLUMNS: 120
28+
TERM_PROGRAM: Hyper
29+
30+
jobs:
31+
phpunit:
32+
name: Tests
33+
runs-on: ubuntu-latest
34+
env:
35+
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
36+
strategy:
37+
matrix:
38+
php-version: [ 7.2, 7.3, 7.4 ]
39+
experimental: [ false ]
40+
composer_flags: [ "--prefer-lowest", "" ]
41+
include:
42+
- php-version: "8.0"
43+
experimental: true
44+
- php-version: "8.1"
45+
experimental: true
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v2
49+
with:
50+
fetch-depth: 0
51+
52+
- name: Setup PHP and composer
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: ${{ matrix.php-version }}
56+
coverage: xdebug
57+
tools: composer
58+
59+
- name: Build the Project
60+
continue-on-error: ${{ matrix.experimental }}
61+
run: make update --no-print-directory
62+
63+
- name: 🧪 PHPUnit Tests
64+
continue-on-error: ${{ matrix.experimental }}
65+
run: make test --no-print-directory
66+
67+
- name: 👍 Code Quality
68+
continue-on-error: ${{ matrix.experimental }}
69+
run: make codestyle --no-print-directory
70+
71+
- name: 📝 Build All Reports at Once
72+
continue-on-error: ${{ matrix.experimental }}
73+
run: make report-all --no-print-directory

0 commit comments

Comments
 (0)