2019-06-16 00:08:18 +02:00
# Use the latest 2.1 version of CircleCI pipeline processing engine, see https://circleci.com/docs/2.0/configuration-reference/
version : 2.1
executors :
2020-10-26 20:26:39 +01:00
php-74 :
2019-06-16 00:08:18 +02:00
docker :
2020-12-29 13:33:11 +01:00
- image : thecodingmachine/php:7.4-v4-cli
2021-05-13 15:34:32 +02:00
php-80 :
docker :
- image : thecodingmachine/php:8.0-v4-cli
2022-02-08 17:55:43 +01:00
php-81 :
docker :
- image : thecodingmachine/php:8.1-v4-cli
2019-06-16 00:08:18 +02:00
jobs :
2019-06-18 03:17:44 +02:00
"Code Style Analysis" :
2020-10-26 20:26:39 +01:00
executor : php-74
2019-06-18 03:17:44 +02:00
steps :
2021-07-18 16:23:50 +02:00
- checkout
2021-07-18 20:00:12 +02:00
- run : date "+%F" > /tmp/cachekey; cat composer.json >> /tmp/cachekey
- restore_cache :
keys :
- composer-v4
2022-12-02 00:59:51 +01:00
- run : COMPOSER_ROOT_VERSION=dev-master composer update
2021-07-18 20:00:12 +02:00
- save_cache :
key : composer-v4
paths :
- /home/docker/.composer/cache/files
- /home/docker/.composer/cache/vcs
2021-07-18 20:01:38 +02:00
- persist_to_workspace :
root : /home/docker/project/
paths :
- .
2019-06-18 03:17:44 +02:00
- run :
name : Code Style Analysis with PHPCS
2023-06-07 08:45:42 +02:00
command : vendor/bin/phpcs -d memory_limit=512M
2021-07-18 20:01:38 +02:00
2019-06-15 15:04:52 +02:00
phar-build :
2020-10-26 20:26:39 +01:00
executor : php-74
2019-06-15 15:04:52 +02:00
steps :
- attach_workspace :
at : /home/docker/project/
- run :
name : Build Phar file
command : bin/build-phar.sh
- run :
name : Smoke test Phar file
command : build/psalm.phar --version
- store_artifacts :
path : build/psalm.phar
2019-07-10 21:43:17 +02:00
- run :
name : Display link to phar file
command : |
echo "Phar build available at:"
echo https://circleci.com/api/v1.1/project/github/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BUILD_NUM}/artifacts/0/home/docker/project/build/psalm.phar
2019-06-15 15:04:52 +02:00
- persist_to_workspace :
root : /home/docker/project/
paths :
- build/psalm.phar
2023-03-06 10:36:02 +01:00
# The resource_class feature allows configuring CPU and RAM resources for each job. Different resource classes are available for different executors. https://circleci.com/docs/2.0/configuration-reference/#resourceclass
resource_class : large
2019-08-26 06:45:40 +02:00
test-with-real-projects :
2022-02-08 17:53:51 +01:00
executor : php-81
2019-08-26 06:45:40 +02:00
steps :
- checkout # used here just for the side effect of loading the github public ssh key so we can clone other stuff
- attach_workspace :
at : /home/docker/project/
- run :
name : Analyse PHPUnit
2020-04-06 02:25:50 +02:00
command : bin/test-with-real-projects.sh phpunit
2022-02-06 19:35:25 +01:00
- run :
name : Analyse Psl
command : bin/test-with-real-projects.sh psl
2021-04-19 01:22:03 +02:00
- run :
name : Analyse Collections
command : bin/test-with-real-projects.sh collections
2019-06-16 00:08:18 +02:00
# Orchestrate or schedule a set of jobs, see https://circleci.com/docs/2.0/workflows/
workflows :
Welcome :
jobs :
2021-07-18 16:21:06 +02:00
- "Code Style Analysis"
2019-06-15 15:04:52 +02:00
- phar-build :
requires :
2019-06-18 03:17:44 +02:00
- "Code Style Analysis"
2019-09-14 21:49:01 +02:00
- test-with-real-projects :
requires :
- phar-build