From 756463d39df2f72a402ca33f2248419bc4dcf449 Mon Sep 17 00:00:00 2001 From: Alessandro Minoccheri Date: Fri, 1 Jan 2021 17:25:16 +0100 Subject: [PATCH 1/2] added github actions change docker to docker github images update --- .circleci/config.yml | 0 .github/workflows/php.yml | 42 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) mode change 100644 => 100755 .circleci/config.yml create mode 100644 .github/workflows/php.yml diff --git a/.circleci/config.yml b/.circleci/config.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..2c098c4 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,42 @@ +name: Poser + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + container: pugx/poser:php80 + steps: + - uses: actions/checkout@v2 + + - name: Validate composer.json + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install -n --no-progress --no-suggest + + - name: Coding Standard Checks + run: PHP_CS_FIXER_IGNORE_ENV=1 bin/php-cs-fixer fix --verbose --diff --dry-run + + - name: phpspec + run: bin/phpspec run --format=pretty + + - name: Run tests (phpspec) + run: ./bin/phpspec run --format=pretty + + - name: Run coverage tests (phpspec) + run: XDEBUG_MODE=coverage bin/phpspec run -f progress -c phpspec-coverage.yml + + - name: Run behat tests + run: ./bin/behat From 149d4f7a97894308c09ff2b9afefd03733e52add Mon Sep 17 00:00:00 2001 From: Alessandro Minoccheri Date: Mon, 4 Jan 2021 11:58:29 +0100 Subject: [PATCH 2/2] using different images --- .circleci/config.yml | 0 .github/workflows/php.yml | 11 ++++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) mode change 100755 => 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 2c098c4..b59adb7 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -6,8 +6,13 @@ on: jobs: build: + + strategy: + matrix: + container: [ "php74", "php80" ] + runs-on: ubuntu-latest - container: pugx/poser:php80 + container: pugx/poser:${{ matrix.container }} steps: - uses: actions/checkout@v2 @@ -19,9 +24,9 @@ jobs: uses: actions/cache@v2 with: path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-php-${{ matrix.container }}-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-php- + ${{ runner.os }}-php-${{ matrix.container }} - name: Install dependencies run: composer install -n --no-progress --no-suggest