From 7a73219412a675f5ad068d90f8654b723482a053 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 27 Dec 2022 11:44:46 +0100 Subject: [PATCH] Checkout current branch in cypress tests in CI Signed-off-by: Louis Chemineau --- .github/workflows/cypress.yml | 4 ++-- cypress/dockerNode.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index c95792385404c..1036e67b51d6c 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -9,7 +9,7 @@ on: env: APP_NAME: viewer - BRANCH: ${{ github.base_ref }} + BRANCH: ${{ github.ref }} TESTING: true jobs: @@ -30,7 +30,7 @@ jobs: - name: Set up node ${{ steps.versions.outputs.nodeVersion }} uses: actions/setup-node@v3 with: - cache: 'npm' + cache: "npm" node-version: ${{ steps.versions.outputs.nodeVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }} diff --git a/cypress/dockerNode.ts b/cypress/dockerNode.ts index 13e75c605b243..93b228c4460a3 100644 --- a/cypress/dockerNode.ts +++ b/cypress/dockerNode.ts @@ -83,6 +83,9 @@ export const startNextcloud = async function(branch: string = 'master'): Promise HostConfig: { Binds: [], }, + Env: [ + `BRANCH=${branch}`, + ] }) await container.start()