Skip to content

Commit a8ba865

Browse files
authored
Merge pull request #1 from bugphix/circleci-project-setup
Circleci project setup
2 parents ae0d0aa + c30ac06 commit a8ba865

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.circleci/config.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# PHP CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-php/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# Specify the version you desire here
10+
- image: circleci/php:7.4-cli
11+
12+
# Specify service dependencies here if necessary
13+
# CircleCI maintains a library of pre-built images
14+
# documented at https://circleci.com/docs/2.0/circleci-images/
15+
# Using the RAM variation mitigates I/O contention
16+
# for database intensive operations.
17+
# - image: circleci/mysql:5.7-ram
18+
#
19+
# - image: redis:2.8.19
20+
21+
steps:
22+
- checkout
23+
24+
- run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev
25+
- run: sudo docker-php-ext-install zip
26+
- run: sudo apt install curl
27+
- run: sudo apt install nodejs
28+
- run: nodejs --version
29+
- run: curl -L https://npmjs.org/install.sh | sudo sh
30+
- run: npm -v
31+
32+
# Download and cache dependencies
33+
#- restore_cache:
34+
# keys:
35+
# "composer.lock" can be used if it is committed to the repo
36+
# - v1-dependencies-{{ checksum "composer.json" }}
37+
# fallback to using the latest cache if no exact match is found
38+
# - v1-dependencies-
39+
40+
- run: composer install
41+
- run: composer require --dev phpunit/phpunit
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: npm 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
62+
- run: ./vendor/bin/phpunit

0 commit comments

Comments
 (0)