Skip to content

Commit

Permalink
Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Plopix committed Nov 11, 2019
1 parent 9a51588 commit 6a19ebe
Show file tree
Hide file tree
Showing 23 changed files with 345 additions and 379 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [plopix]
76 changes: 76 additions & 0 deletions .github/workflows/main-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI

on: [push, pull_request]

jobs:

lint:
name: Coding Standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: 7.3
id: php
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
- name: Check Sources
run: php vendor/bin/phpcs --standard=.cs/cs_ruleset.xml --extensions=php src/
- name: Check Tests
run: php vendor/bin/phpcs --standard=.cs/cs_ruleset.xml --extensions=php src/

tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.2, 7.3]
steps:
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
id: php
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
- name: Show Versions
run: composer info -i
- name: PHP Unit
run: php vendor/bin/phpunit -c tests/ --exclude-group behat
- name: Behat
run: php vendor/behat/behat/bin/behat -c tests/behat.yml


usage:
name: Usage
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.2, 7.3]
ezversion: [1.13.*, 2.*]
collection: [collection-1x.json, collection-2x.json]
exclude:
- ezversion: 1.13.*
collection: collection-2x.json
- ezversion: 2.*
collection: collection-1x.json
steps:
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
id: php
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
- name: Initialization
run: php bin/ez-prod init ezsystems/ezplatform ${{ matrix.ezversion }} --no-interaction -vvv
- name: Status Info
run: php bin/ez-prod ps
- name: Verification using Postman
run: docker run --net=host -v $(pwd)/tests/postman:/etc/newman -t postman/newman_ubuntu1404 run ${{ matrix.collection }}
47 changes: 47 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
push:
tags:
- 'v*'

name: Upload Phar

jobs:
build:
name: Upload Phar
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install PROD dependencies ONLY
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction --no-dev
- name: Build project
env:
EZ_LAUNCHPAD_PHAR_PRIVATE_KEY: ${{ secrets.EZ_LAUNCHPAD_PHAR_PRIVATE_KEY }}
run: |
echo "${EZ_LAUNCHPAD_PHAR_PRIVATE_KEY}" > ezlaunchpad-private.pem
ulimit -Sn 4096
curl -LSs https://box-project.github.io/box2/installer.php | php
chmod 755 box.phar
php -d "phar.readonly=false" ./box.phar build -vv
rm ezlaunchpad-private.pem
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ez.phar
asset_name: ez.phar
asset_content_type: application/octet-stream
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/composer.phar
/box.phar
/ez.phar
/ez.phar.*
/vendor/
.php~
.idea
Expand All @@ -21,9 +23,9 @@ tests/coverage
/.ezlaunchpad.yml

# Travis stuff
/.travis/build-key.pem
/.travis/ezlaunchpad-private.pem
/.travis/secrets.tar
/build-key.pem
/ezlaunchpad-private.pem
/secrets.tar
/plantuml.jar

# others
Expand All @@ -35,3 +37,4 @@ tests/coverage
/ez_install.bash
/composer_install.bash
/ez_install_solr.bash

52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

Binary file removed .travis/secrets.tar.enc
Binary file not shown.
4 changes: 2 additions & 2 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"in": "vendor"
}
],
"git-commit": "package_version",
"git-tag": "package_version",
"main": "bin/ez-prod",
"key": ".travis/ezlaunchpad-private.pem",
"key": "ezlaunchpad-private.pem",
"output": "ez.phar",
"stub": true
}
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"symfony/filesystem": "~4.3",
"novactive/collection": "^1.0",
"symfony/options-resolver": "~4.3",
"padraic/phar-updater": "^1.0.6",
"symfony/event-dispatcher": "~4.3",
"nesbot/carbon": "^2"
},
Expand Down
Loading

0 comments on commit 6a19ebe

Please sign in to comment.