Skip to content

Commit

Permalink
Merge pull request #14 from dsantang/migrate-ci-to-github-actions
Browse files Browse the repository at this point in the history
Migrate CI from CircleCI to Github Actions
  • Loading branch information
gfornari authored Oct 13, 2021
2 parents f047baf + e8f0920 commit 9866579
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 167 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

5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "dsantang/domain-events-doctrine",
"description": "Package that provides an integration with Doctrine ORM to automatically dispatch Domain Events.",
"type": "library",
"license": [
"MIT"
],
"keywords": [
"domain event",
"domain driven design",
Expand Down Expand Up @@ -31,7 +34,7 @@
"require": {
"php": "^7.4 || ^8.0",
"doctrine/orm": "^2.8",
"dsantang/domain-events": "^0.4",
"dsantang/domain-events": "^0.5",
"ramsey/uuid": "^4.1",
"symfony/event-dispatcher": "^5.2",
"symfony/event-dispatcher-contracts": "^2.4"
Expand Down
39 changes: 24 additions & 15 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9866579

Please sign in to comment.