-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
68 lines (59 loc) · 1.32 KB
/
.drone.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
kind: pipeline
name: build
steps:
- name: yarn install
image: 20minutes/node-12-yarn-serverless
commands:
- yarn install --dev
- name: composer install
image: composer:1.9
commands:
- composer install -n
- name: assets build
image: 20minutes/node-12-yarn-serverless
commands:
- yarn encore dev
- yarn encore production
- name: mysql
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_USER: tests
MYSQL_PASSWORD: tests
MYSQL_DATABASE: app
detach: true
- name: unit tests
image: composer:1.9
environment:
DATABASE_URL: "mysql://tests:tests@mysql:3306/app?serverVersion=5.7"
commands:
- php bin/phpunit ./tests/unit-tests
- name: functionnal tests
image: composer:1.9
environment:
DATABASE_URL: "mysql://tests:tests@mysql:3306/app?serverVersion=5.7"
commands:
- php bin/phpunit ./tests/functionnal-tests
- name: create artifact
image: alpine:edge
commands:
- rm -rf var/*
- mkdir artifacts
- tar -zcvf artifacts/cicd-demo.tar.gz .
when:
event: tag
- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: github_api_key
files: artifacts/cicd-demo.tar.gz
title: stable version
note: generated by drone cicd
when:
event: tag
trigger:
ref:
include:
- refs/heads/ci/drone
- refs/tags/drone-*