From e10e42a220c43223dc11c740d42d543641e2fedd Mon Sep 17 00:00:00 2001 From: Lucas DELANIER Date: Wed, 8 Mar 2023 01:10:16 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index c637cb3..0eec496 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,12 +1,13 @@ # .semaphore/semaphore.yml - +kind: pipeline +type: docker # Use the latest stable version of Semaphore 2.0 YML syntax: version: v1.0 # Name your pipeline. In the event that you connect multiple pipelines with promotions, # the name will help you differentiate between, for example, CI build phases # and delivery phases. -name: MovieFinderPiepline +name: MovieFinder Pipeline # An agent defines the environment in which your code runs. # It is a combination of one of available machine types and operating @@ -124,3 +125,38 @@ blocks: - cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master - npm test + - name: E2e Tests + task: + env_vars: + - name: NODE_ENV + value: test + - name: CI + value: 'true' + prologue: + commands: + - checkout + - nvm use + - node --version + - npm --version + # Start a Postgres database. On Semaphore, databases run in the same + # environment as your code. + # See https://docs.semaphoreci.com/ci-cd-environment/ubuntu-18.04-image/#databases-and-services + - sem-service start postgres + # With unrestricted sudo access, you can install any additional + # system package: + - sudo apt-get install -y libgtk2.0-0 + jobs: + - name: Client Tests + commands: + - cd src/client + - cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master + - npx cypress install + - npm run test:e2e + - name: Server Tests + commands: + - cd src/server + - cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master + - cp ci.env .env + - cp ormconfig.ci.json ormconfig.json + - npm run migrate:up + - npm run test:e2e \ No newline at end of file