Skip to content

Commit

Permalink
Init github action
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis committed Apr 24, 2021
1 parent 733fb58 commit 1623fe6
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# @link https://github.com/JBZoo/SimpleTypes
#

/.github export-ignore
/.phan export-ignore
/build export-ignore
/tests export-ignore
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#
# JBZoo Toolbox - SimpleTypes
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package SimpleTypes
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/SimpleTypes
#

name: Continuous Integration

on:
pull_request:
branches:
- "*"
push:
branches:
- 'master'
schedule:
- cron: '15 */8 * * *'

env:
COLUMNS: 120
TERM_PROGRAM: Hyper

jobs:
phpunit:
name: Tests
runs-on: ubuntu-latest
env:
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
strategy:
matrix:
php-version: [ 7.2, 7.3, 7.4 ]
experimental: [ false ]
composer_flags: [ "--prefer-lowest", "" ]
include:
- php-version: "8.0"
experimental: true
- php-version: "8.1"
experimental: true
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup PHP and composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer

- name: Build the Project
continue-on-error: ${{ matrix.experimental }}
run: make update --no-print-directory

- name: 🧪 PHPUnit Tests
continue-on-error: ${{ matrix.experimental }}
run: make test --no-print-directory

- name: 👍 Code Quality
continue-on-error: ${{ matrix.experimental }}
run: make codestyle --no-print-directory

- name: 📝 Build All Reports at Once
continue-on-error: ${{ matrix.experimental }}
run: make report-all --no-print-directory

0 comments on commit 1623fe6

Please sign in to comment.