🔨 test the build with gitlab CI

This commit is contained in:
Baptiste Lemoine 2020-10-31 16:12:44 +01:00
parent d9301559ef
commit 41fd153991
4 changed files with 29 additions and 38 deletions

View File

@ -2,7 +2,8 @@
image: node:latest
stages:
- pages
- build
# - pages
- test
# - e2e
@ -10,38 +11,36 @@ cache:
paths:
- node_modules/
pages:
stage: pages
script:
- yarn install --pure-lockfile
- yarn build:prod:gitlabpage
- mv dist/framadate/ public/
artifacts:
paths:
- public
expire_in: '2 hours'
only:
- develop
#pages:
# stage: pages
# script:
# - yarn install --pure-lockfile
# - yarn build:prod:gitlabpage
# - mv dist/framadate/ public/
# artifacts:
# paths:
# - public
# expire_in: '2 hours'
# only:
# - develop
test:
stage: test
script:
- npm i
- pkill Xvfb
- npm run test:ci
artifacts:
paths:
- coverage/
cache:
policy: pull
#test:
# stage: test
# script:
# - npm i
# - pkill Xvfb
# - npm run test:ci
# artifacts:
# paths:
# - coverage/
# cache:
# policy: pull
test-build:
stage: test
build:
stage: build
script:
- yarn install --pure-lockfile
- npx ng build --prod
only:
- master
cache:
policy: pull

View File

@ -5,16 +5,6 @@
<mat-form-field appearance="outline">
<mat-label>Titre</mat-label>
<input #title matInput placeholder="Question posée, sujet" formControlName="title" required />
<button
mat-button
*ngIf="question.value"
matSuffix
mat-icon-button
aria-label="Clear"
(click)="question.value = ''"
>
<i class="fa fa-close"></i>
</button>
</mat-form-field>
<mat-form-field appearance="outline" class="is-flex">

View File

@ -6,6 +6,7 @@ const backendApiUrlsInDev = {
export const environment = {
production: true,
appTitle: 'FramaDate',
appVersion: '2.0.0',
appLogo: '/assets/img/logo.png',
api: {
baseHref: backendApiUrlsInDev.remote,

View File

@ -10,6 +10,7 @@ const backendApiUrlsInDev = {
export const environment = {
production: false,
appTitle: 'FramaDate',
appVersion: '2.0.0',
appLogo: 'assets/img/logo.png',
api: {
baseHref: backendApiUrlsInDev.local,