Browse Source

🔨 test the build with gitlab CI

develop
Baptiste Lemoine 2 years ago
parent
commit
41fd153991
  1. 55
      .gitlab-ci.yml
  2. 10
      src/app/features/administration/stepper/stepper.component.html
  3. 1
      src/environments/environment.prod.ts
  4. 1
      src/environments/environment.ts

55
.gitlab-ci.yml

@ -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

10
src/app/features/administration/stepper/stepper.component.html

@ -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">

1
src/environments/environment.prod.ts

@ -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,

1
src/environments/environment.ts

@ -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,

Loading…
Cancel
Save