-
Notifications
You must be signed in to change notification settings - Fork 279
/
config.yml
86 lines (78 loc) · 2.59 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
test:
docker:
# Specify the version you desire here
- image: circleci/php:7.2-stretch
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# Using the RAM variation mitigates I/O contention
# for database intensive operations.
# - image: circleci/mysql:5.7-ram
# - image: redis:3
- image: circleci/mysql:8.0.20-ram
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
MYSQL_USER: forge
MYSQL_DATABASE: forge
MYSQL_ROOT_PASSWORD: ''
MYSQL_PASSWORD: 'forge'
steps:
- checkout
- run:
name: Install MySQL driver
command: |
sudo docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd
sudo docker-php-ext-install zip bcmath pdo_mysql
- run:
name: Install Node
command: |
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
# Download and cache dependencies
# composer cache
- restore_cache:
keys:
# "composer.json" can be used if "composer.json"
# is not committed to the repository.
- composer-v1-{{ checksum "composer.lock" }}
# fallback to using the latest cache if no exact match is found
- composer-v1-
- run: composer install -n --prefer-dist
- save_cache:
key: composer-v1-{{ checksum "composer.lock" }}
paths:
- vendor
# node cache
- restore_cache:
keys:
- node-v4-{{ checksum "package.json" }}
- node-v4-
- run: npm install
- save_cache:
key: node-v4-{{ checksum "package.json" }}
paths:
- node_modules
- ~/.yarn
# prepare the database
- run: touch storage/testing.sqlite
- run: php artisan migrate --env=testing --database=mysql --force
# run tests with phpunit or codecept
#- run: ./vendor/bin/phpunit
# this example uses codecept but you're not limited to it
- run: ./vendor/bin/codecept build
- run: ./vendor/bin/codecept run --xml result.xml
- store_test_results:
path: tests/_output
- store_artifacts:
path: tests/_output
workflows:
version: 2
workflow:
jobs:
- test