Skip to content

Commit

Permalink
Add circleci configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
johannessteu committed Jun 17, 2020
1 parent 2c49d7c commit 2ad99fc
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,81 @@
version: 2.1

aliases:
- &ci-build-image quay.io/yeebase/ci-build:7.3
- &workspace_root ~/workspace

- &save_composer_cache
key: composer-cache-v1-{{ .Branch }}-{{ checksum "composer.json" }}
paths:
- /composer/cache-dir

- &restore_composer_cache
keys:
- composer-cache-v1-{{ .Branch }}-{{ checksum "composer.json.ci" }}
- composer-cache-v1-{{ .Branch }}-
- composer-cache-v1-

- &attach_workspace
at: *workspace_root

- &persist_to_workspace
root: .
paths:
- .

jobs:
checkout:
docker:
- image: *ci-build-image
environment:
COMPOSER_CACHE_DIR: /composer/cache-dir
steps:
- checkout
- restore_cache: *restore_composer_cache

- run: |
mkdir graphql-upload
shopt -s extglob dotglob
mv !(graphql-upload) graphql-upload
shopt -u dotglob
cp graphql-upload/composer.json.ci composer.json
cp graphql-upload/phpcs.xml.dist phpcs.xml.dist
composer update
- save_cache: *save_composer_cache
- persist_to_workspace: *persist_to_workspace

lint:
working_directory: *workspace_root
docker:
- image: *ci-build-image
steps:
- attach_workspace: *attach_workspace
- run: bin/phpcs graphql-upload/Classes


workflows:
version: 2
build_and_test:
jobs:
- checkout:
filters:
branches:
ignore: /dependabot.*/
- lint:
requires:
- checkout

build_and_test_dependabot:
jobs:
- hold:
type: approval
filters:
branches:
only: /dependabot.*/
- checkout:
requires:
- hold
- lint:
requires:
- checkout
31 changes: 31 additions & 0 deletions composer.json.ci
@@ -0,0 +1,31 @@
{
"name": "t3n/test-setup",
"description": "Test setup for flow packages",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"require": {
"neos/flow": "~6.0",
"neos/buildessentials": "~6.0",
"t3n/graphql": "^2.1",
"t3n/coding-standard": "~1.1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "~3.5",
"phpunit/phpunit": "~8.5",
"mikey179/vfsstream": "~1.6"
},
"repositories": {
"srcPackage": {
"type": "path",
"url": "./graphql-upload"
}
},
"scripts": {
"post-update-cmd": "Neos\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "Neos\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update": "Neos\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install": "Neos\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}

0 comments on commit 2ad99fc

Please sign in to comment.