|
| 1 | +# PHP CircleCI 2.0 configuration file |
| 2 | +# See: https://circleci.com/docs/2.0/language-php/ |
| 3 | +version: 2 |
| 4 | + |
| 5 | +# Define a job to be invoked later in a workflow. |
| 6 | +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. |
| 10 | + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor |
| 11 | + docker: |
| 12 | + # Specify the version you desire here |
| 13 | + - image: cimg/php:8.2.20-node |
| 14 | + |
| 15 | + # Specify service dependencies here if necessary |
| 16 | + # CircleCI maintains a library of pre-built images |
| 17 | + # documented at https://circleci.com/docs/2.0/circleci-images/ |
| 18 | + # Using the RAM variation mitigates I/O contention |
| 19 | + # for database intensive operations. |
| 20 | + # - image: circleci/mysql:5.7-ram |
| 21 | + # |
| 22 | + # - image: redis:2.8.19 |
| 23 | + |
| 24 | + # Add steps to the job |
| 25 | + # See: https://circleci.com/docs/2.0/configuration-reference/#steps |
| 26 | + steps: |
| 27 | + - checkout |
| 28 | + |
| 29 | + - run: sudo apt update -y && sudo apt-get install -y zip unzip # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev |
| 30 | + - run: sudo docker-php-ext-install zip |
| 31 | + #- run: sudo install-php-extensions redis |
| 32 | + |
| 33 | + # Download and cache dependencies |
| 34 | + - restore_cache: |
| 35 | + keys: |
| 36 | + # "composer.lock" can be used if it is committed to the repo |
| 37 | + - v1-dependencies-{{ checksum "composer.json" }} |
| 38 | + # fallback to using the latest cache if no exact match is found |
| 39 | + - v1-dependencies- |
| 40 | + |
| 41 | + - run: composer install -n --prefer-dist |
| 42 | + |
| 43 | + - save_cache: |
| 44 | + key: v1-dependencies-{{ checksum "composer.json" }} |
| 45 | + paths: |
| 46 | + - ./vendor |
| 47 | + #- restore_cache: |
| 48 | + # keys: |
| 49 | + # - node-v1-{{ checksum "package.json" }} |
| 50 | + # - node-v1- |
| 51 | + - run: yarn install |
| 52 | + #- save_cache: |
| 53 | + # key: node-v1-{{ checksum "package.json" }} |
| 54 | + # paths: |
| 55 | + # - node_modules |
| 56 | + |
| 57 | + # prepare the database |
| 58 | + #- run: touch storage/testing.sqlite |
| 59 | + #- run: php artisan migrate --env=testing --database=sqlite_testing --force |
| 60 | + |
| 61 | + # run tests with phpunit or codecept |
| 62 | + #- run: ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover |
| 63 | + - run: ./vendor/bin/phpunit |
0 commit comments