Skip to content

Commit 2c05082

Browse files
authored
refactor #32 Initialize Github Actions (clem21, Zales0123)
This PR was merged into the 4.0-dev branch. Discussion ---------- Commits ------- 66b62a4 Initialize Github Actions c1a96a1 Modify and simplify workflow file
2 parents 50b55dc + c1a96a1 commit 2c05082

2 files changed

Lines changed: 65 additions & 26 deletions

File tree

.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
push: ~
5+
pull_request: ~
6+
release:
7+
types: [created]
8+
schedule:
9+
-
10+
cron: "0 1 * * 6" # Run at 1am every Saturday
11+
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
16+
name: "PHP ${{ matrix.php }}, ECS ${{ matrix.ecs }}"
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
php: [7.4, 7.3]
22+
ecs: [9.*, 8.*]
23+
24+
steps:
25+
-
26+
uses: actions/checkout@v2
27+
28+
-
29+
name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: "${{ matrix.php }}"
33+
extensions: intl
34+
tools: symfony
35+
coverage: none
36+
37+
-
38+
name: Get Composer cache directory
39+
id: composer-cache
40+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
41+
42+
-
43+
name: Cache Composer
44+
uses: actions/cache@v2
45+
with:
46+
path: ${{ steps.composer-cache.outputs.dir }}
47+
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
48+
restore-keys: |
49+
${{ runner.os }}-php-${{ matrix.php }}-composer-
50+
51+
-
52+
name: Require EasyCodingStandard version
53+
run: composer require symplify/easy-coding-standard:${{ matrix.ecs }} --no-update --no-scripts
54+
55+
-
56+
name: Install PHP dependencies
57+
run: composer install --no-interaction
58+
59+
-
60+
name: Validate composer.json
61+
run: composer validate --ansi --strict
62+
63+
-
64+
name: Run test
65+
run: vendor/bin/ecs check --config ecs.php tests ecs.php

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)