-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
72 lines (70 loc) · 1.83 KB
/
.travis.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
sudo: false
jobs:
fast_finish: true
include:
# build frontend
- stage: build-frontend
language: node_js
node_js:
- 14
before_script:
- cd frontend
script:
- yarn install
- yarn build
cache:
yarn: true
directories:
- node_modules
# TEST FRONTEND
- stage: test-frontend
language: node_js
node_js:
- 14
before_script:
- cd frontend
script:
- yarn global add codecov
- yarn install
- yarn serve & # run app at bg
- yarn test:e2e:ci # test e2e
- yarn test:unit:ci # test unit
- kill $(jobs -p) || true # Kill all bg process
cache:
yarn: true
directories:
- node_modules
- stage: push-frontend-docker-image
language: ruby
services:
- docker
before_install:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
before_script:
- cd frontend
script:
- docker build -t celebikutay/gotodo-frontend:latest .
- docker push celebikutay/gotodo-frontend:latest
# TEST API
- stage: test-api
language: go
go:
- 1.16.6
before_script:
- cd api
script:
- go mod download
- go test ./... -race -coverprofile=coverage.txt -covermode=atomic
after_success:
- bash <(curl -s https://codecov.io/bash)
- stage: push-api-docker-image
language: ruby
services:
- docker
before_install:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
before_script:
- cd api
script:
- docker build -t celebikutay/gotodo-api:latest .
- docker push celebikutay/gotodo-api:latest