Skip to content
Snippets Groups Projects
Commit 6490d261 authored by Antoine Gaudron-Desjardins's avatar Antoine Gaudron-Desjardins
Browse files

improve ci

parent 8efc2bc4
Branches
No related tags found
1 merge request!22improve ci
Pipeline #43817 failed
......@@ -26,17 +26,6 @@ image: python:3.9
# Password: $MYSQL_PASSWORD
# Database: $MYSQL_DATABASE
# cache:
# paths:
# - .cache/pip
# - venv/
# - env/
# before_script:
# - python --version # For debugging
# - pip install venv
# - python3 -m venv /venv
# - source /venv/bin/activate
stages:
- build
......@@ -57,17 +46,28 @@ workflow:
#### ####
#######################################################################################################################################
install:
install-virtualenv:
stage: build
cache:
paths:
- venv/
expire_in: 30 mins
script:
- python3 -m venv ./venv
- source ./venv/bin/activate
- pip install --upgrade pip && pip install pip-tools
- pip install -r ./backend/requirements.txt
artifacts:
install-npm-packages:
stage: build
cache:
paths:
- ./venv/
- node_modules/
expire_in: 30 mins
script:
- cd ./frontend
- npm ci
#######################################################################################################################################
#### ####
......@@ -82,16 +82,18 @@ lint-back:
- pip install pycodestyle
script:
- pycodestyle --config=./backend/setup.cnf ./backend
dependencies:
- install-virtualenv
lint-front:
image: node:14.6.0
stage: test
before_script:
- cd frontend/
- npm install
script:
- cd frontend/
- npm run lint
dependencies:
- install-npm-packages
# test:
......@@ -159,7 +161,7 @@ lint-front:
docker-compose up -d &&
exit" ; else
- cd ./frontend
- npm install && npm run build
- npm run build
- scp -r build/ eatfast@"$DOMAIN":/var/www/eatfast-website/frontend ; fi
......@@ -182,6 +184,7 @@ deploy-back-prod:
DOMAIN: eatfast.cs-campus.fr
PRIVATE_KEY: "$SSH_PRIVATE_KEY"
IMAGE: "back"
dependencies: []
deploy-front-prod:
......@@ -193,3 +196,5 @@ deploy-front-prod:
DOMAIN: eatfast.cs-campus.fr
PRIVATE_KEY: "$SSH_PRIVATE_KEY"
IMAGE: "front"
dependencies:
- install-npm-packages
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment