Skip to content

Commit

Permalink
Migrate CI from CircleCI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gfornari committed Oct 13, 2021
1 parent 4ad58fa commit e8f0920
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 151 deletions.
151 changes: 0 additions & 151 deletions .circleci/config.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/actions/composer-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Install dependencies
description: Install dependencies with Composer
runs:
using: 'composite'
steps:
- run: composer validate --strict
shell: bash

- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
shell: bash

- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- run: composer install -a -n --no-progress
shell: bash
91 changes: 91 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Quality checks

on:
pull_request:

jobs:
test:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"

steps:
- uses: actions/checkout@v2

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

- uses: ./.github/actions/composer-install

- name: Run unit tests
run: make test-unit

- name: Run mutation tests
run: make test-mutation

- name: Run integration tests
run: make test-integration

static-analysis:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer:v2

- uses: ./.github/actions/composer-install

- name: Run static analysis
run: make static-analysis

style-check:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer:v2

- uses: ./.github/actions/composer-install

- name: Run style checker
run: make cs-check

composer-require-checker:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer:v2

- uses: ./.github/actions/composer-install

- name: Run ComposerRequireChecker
run: make composer-require-checker

0 comments on commit e8f0920

Please sign in to comment.