From 6965d7e58a79204f8fa03813900b15407e02f287 Mon Sep 17 00:00:00 2001 From: Jonny Ngo Luong <jonnynl@stud.ntnu.no> Date: Wed, 24 Mar 2021 09:38:59 +0100 Subject: [PATCH] a --- .gitlab-ci.yml | 54 +++++++++++++------------------------------------- 1 file changed, 14 insertions(+), 40 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d891bd5..f760a16 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,42 +1,16 @@ -name: Frontend build-test and unit-tests +build: + stage: build + script: + - echo "build" -on: - push: - branches: [main] - paths: - - "client/**" - - "!**.md" - pull_request: - branches: [main] - paths: - - "client/**" - - "!**.md" - workflow_dispatch: +test: + stage: test + script: + - echo "test" -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: "15" - - name: Cache frontend node modules - id: cacheStep - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - with: - path: client/node_modules - key: ${{ runner.os }}-build-${{ hashFiles('./client/package-lock.json') }} - - - name: Install frontend dependencie - if: steps.cacheStep.outputs.cache-hit != 'true' - run: cd client && npm install - - - name: Builds frontend - run: cd client && npm run build --if-present - - - name: Tests frontend - run: cd client && npm test +deploy: + stage: deploy + script: + - echo "deploy" + only: + - master -- GitLab