Skip to content

Commit 56d6a9a

Browse files
committed
feat(env): added new test env with workflow in circleci
1 parent 441fd55 commit 56d6a9a

File tree

4 files changed

+53
-11
lines changed

4 files changed

+53
-11
lines changed

.circleci/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ workflows:
3535
ignore: main
3636
tags:
3737
only: /.*/
38+
- deploy-test:
39+
requires:
40+
- build
41+
filters:
42+
branches:
43+
only:
44+
- test
3845
- deploy-staging:
3946
requires:
4047
- build
@@ -185,6 +192,18 @@ jobs:
185192
- store_artifacts:
186193
path: /home/circleci/mapmarker.io/tests/Browser/screenshots
187194

195+
deploy-test:
196+
<<: *defaults
197+
steps:
198+
- setup_remote_docker:
199+
version: 20.10.14
200+
- attach_workspace:
201+
at: /home/circleci
202+
- checkout
203+
- run:
204+
name: Deploy Test
205+
command: yarn vapor deploy test --commit $CIRCLE_SHA1 --message "$(git log --format=%B -n 1 $CIRCLE_SHA1 | head -n 3)"
206+
188207
deploy-staging:
189208
<<: *defaults
190209
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ yarn-error.log
1919
public/css/app.css
2020
public/js/app.js
2121
public/mix-manifest.json
22+
.env.test

test.Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM laravelphp/vapor:php81
2+
3+
# install gd
4+
RUN apk add --no-cache freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev && \
5+
docker-php-ext-configure gd \
6+
--enable-gd \
7+
--with-freetype \
8+
--with-jpeg && \
9+
docker-php-ext-install gd
10+
11+
# cleanup
12+
RUN apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev
13+
14+
COPY . /var/task

vapor.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,29 @@ name: mapmarker
33
environments:
44
production:
55
domain:
6-
- "mapmarker.io"
7-
- "cdn.mapmarker.io"
6+
- mapmarker.io
7+
- cdn.mapmarker.io
88
memory: 1024
99
cli-memory: 512
10-
runtime: "docker"
10+
runtime: docker
1111
build:
12-
- "COMPOSER_MIRROR_PATH_REPOS=1 composer install --no-dev"
13-
- "php artisan event:cache"
14-
- "yarn prod && rm -rf node_modules"
12+
- 'COMPOSER_MIRROR_PATH_REPOS=1 composer install --no-dev'
13+
- 'php artisan event:cache'
14+
- 'yarn prod && rm -rf node_modules'
1515
staging:
16-
domain: "staging.mapmarker.io"
16+
domain: staging.mapmarker.io
1717
memory: 1024
1818
cli-memory: 512
19-
runtime: "docker"
19+
runtime: docker
2020
build:
21-
- "COMPOSER_MIRROR_PATH_REPOS=1 composer install"
22-
- "php artisan event:cache"
23-
- "yarn prod && rm -rf node_modules"
21+
- 'COMPOSER_MIRROR_PATH_REPOS=1 composer install'
22+
- 'php artisan event:cache'
23+
- 'yarn prod && rm -rf node_modules'
24+
test:
25+
memory: 1024
26+
cli-memory: 512
27+
runtime: docker
28+
build:
29+
- 'COMPOSER_MIRROR_PATH_REPOS=1 composer install'
30+
- 'php artisan event:cache'
31+
- 'yarn prod && rm -rf node_modules'

0 commit comments

Comments
 (0)