Skip to content

Commit

Permalink
refactor #32 Initialize Github Actions (clem21, Zales0123)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.0-dev branch.

Discussion
----------



Commits
-------

66b62a4 Initialize Github Actions
c1a96a1 Modify and simplify workflow file
  • Loading branch information
GSadee authored Sep 16, 2021
2 parents 50b55dc + c1a96a1 commit 2c05082
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 26 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build

on:
push: ~
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday

jobs:
tests:
runs-on: ubuntu-latest

name: "PHP ${{ matrix.php }}, ECS ${{ matrix.ecs }}"

strategy:
fail-fast: false
matrix:
php: [7.4, 7.3]
ecs: [9.*, 8.*]

steps:
-
uses: actions/checkout@v2

-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
extensions: intl
tools: symfony
coverage: none

-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-
-
name: Require EasyCodingStandard version
run: composer require symplify/easy-coding-standard:${{ matrix.ecs }} --no-update --no-scripts

-
name: Install PHP dependencies
run: composer install --no-interaction

-
name: Validate composer.json
run: composer validate --ansi --strict

-
name: Run test
run: vendor/bin/ecs check --config ecs.php tests ecs.php
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

0 comments on commit 2c05082

Please sign in to comment.