Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit e02e4dd

Browse files
stanislav.shupilkinTekill
authored andcommitted
Add workflow and first ci file, add editorconfig, change Makefile, remove deprecated flag
1 parent 38822ba commit e02e4dd

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
root = true
3+
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
charset = utf-8
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{yml,yaml}]
12+
indent_size = 2

.github/workflows/tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
tags:
7+
pull_request:
8+
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: [7.1, 7.2, 7.3, 7.4]
17+
os: [ubuntu-18.04]
18+
name: PHP v${{ matrix.php }} Test ${{ matrix.env }} on ${{ matrix.os }}
19+
20+
steps:
21+
- uses: actions/checkout@v1
22+
23+
- name: Install PHP
24+
uses: shivammathur/setup-php@1.7.4
25+
with:
26+
php-version: ${{ matrix.php }}
27+
extensions: json, mbstring, pdo
28+
29+
- name: Get Composer Cache Directory
30+
id: composer-cache
31+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
32+
33+
- name: Cache dependencies
34+
uses: actions/cache@v1
35+
with:
36+
path: ${{ steps.composer-cache.outputs.dir }}
37+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
38+
restore-keys: ${{ runner.os }}-composer-
39+
40+
- name: Install dependencies
41+
run: composer --prefer-dist install
42+
43+
- name: Run tests
44+
run: make test-unit
45+
46+
- name: Run cs-fixer
47+
run: make php-cs-fix-diff
48+
# Remove after executing command make php-cs-fix and commit changed files
49+
continue-on-error: true

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ php-cs-check:
66
php-cs-fix:
77
$(WORKING_DIR)/vendor/bin/php-cs-fixer fix
88

9+
php-cs-fix-diff:
10+
$(WORKING_DIR)/vendor/bin/php-cs-fixer fix --dry-run --diff
11+
912
test-unit:
1013
./vendor/bin/codecept run unit

0 commit comments

Comments
 (0)