From 2ae228ab0428f62e3f70fc451879ab0f0a010bd5 Mon Sep 17 00:00:00 2001 From: qvalentin Date: Tue, 10 Aug 2021 18:11:33 +0200 Subject: [PATCH 1/2] use npm ci (see https://docs.npmjs.com/cli/v7/commands/npm-ci) --- .github/workflows/featureRelease.yml | 2 +- .github/workflows/latestRelease.yml | 2 +- .github/workflows/stableRelease.yml | 2 +- .github/workflows/storybookBuild.yml | 2 +- .github/workflows/tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/featureRelease.yml b/.github/workflows/featureRelease.yml index 7b70e2ac..5e443255 100644 --- a/.github/workflows/featureRelease.yml +++ b/.github/workflows/featureRelease.yml @@ -27,7 +27,7 @@ jobs: - name: Checkout frontend run: | - npm i + npm ci - name: Update Sonar run: | diff --git a/.github/workflows/latestRelease.yml b/.github/workflows/latestRelease.yml index 9a43f9ca..0a422951 100644 --- a/.github/workflows/latestRelease.yml +++ b/.github/workflows/latestRelease.yml @@ -24,7 +24,7 @@ jobs: - name: Checkout frontend run: | - npm i + npm ci - name: Update Sonar run: | diff --git a/.github/workflows/stableRelease.yml b/.github/workflows/stableRelease.yml index 87868be0..7cd189e6 100644 --- a/.github/workflows/stableRelease.yml +++ b/.github/workflows/stableRelease.yml @@ -17,7 +17,7 @@ jobs: node-version: 12 - name: Build frontend run: | - npm i + npm ci npm run-script build cp -r build webapp_provider/public - name: Login to DockerHub diff --git a/.github/workflows/storybookBuild.yml b/.github/workflows/storybookBuild.yml index 4eef56f5..3aa8726b 100644 --- a/.github/workflows/storybookBuild.yml +++ b/.github/workflows/storybookBuild.yml @@ -17,7 +17,7 @@ jobs: node-version: 12 - name: Build storybook run: | - npm i + npm ci npm run build-storybook cp -r storybook-static storybook_provider/public - name: Login to DockerHub diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1658d6c..53681649 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: # and run all Cypress tests - name: Start FE and run jest tests run: | - npm i + npm ci npm test -- --watchAll=false npm start & - name: Wait From b634dc82495358651ca0fc4749109794ee4522fc Mon Sep 17 00:00:00 2001 From: qvalentin Date: Tue, 10 Aug 2021 19:12:54 +0200 Subject: [PATCH 2/2] use caching for deps --- .github/workflows/featureRelease.yml | 5 +++-- .github/workflows/latestRelease.yml | 5 +++-- .github/workflows/stableRelease.yml | 5 +++-- .github/workflows/storybookBuild.yml | 5 +++-- .github/workflows/tests.yml | 6 ++++++ 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/featureRelease.yml b/.github/workflows/featureRelease.yml index 5e443255..9a4f14c7 100644 --- a/.github/workflows/featureRelease.yml +++ b/.github/workflows/featureRelease.yml @@ -21,9 +21,10 @@ jobs: fetch-depth: 0 - name: Set up Node.js environment - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 + cache: 'npm' - name: Checkout frontend run: | diff --git a/.github/workflows/latestRelease.yml b/.github/workflows/latestRelease.yml index 0a422951..99e70286 100644 --- a/.github/workflows/latestRelease.yml +++ b/.github/workflows/latestRelease.yml @@ -18,9 +18,10 @@ jobs: uses: actions/checkout@v2 - name: Set up Node.js environment - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 + cache: 'npm' - name: Checkout frontend run: | diff --git a/.github/workflows/stableRelease.yml b/.github/workflows/stableRelease.yml index 7cd189e6..19252e2c 100644 --- a/.github/workflows/stableRelease.yml +++ b/.github/workflows/stableRelease.yml @@ -12,9 +12,10 @@ jobs: - name: Set up Project uses: actions/checkout@v2 - name: Set up Node.js environment - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 + cache: 'npm' - name: Build frontend run: | npm ci diff --git a/.github/workflows/storybookBuild.yml b/.github/workflows/storybookBuild.yml index 3aa8726b..278adc7e 100644 --- a/.github/workflows/storybookBuild.yml +++ b/.github/workflows/storybookBuild.yml @@ -12,9 +12,10 @@ jobs: - name: Set up Project uses: actions/checkout@v2 - name: Set up Node.js environment - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 + cache: 'npm' - name: Build storybook run: | npm ci diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 53681649..4c20a009 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - + name: Set up Node.js environment + uses: actions/setup-node@v2 + with: + node-version: 14 + cache: 'npm' # Install NPM dependencies, build the webpage and start it # and run all Cypress tests - name: Start FE and run jest tests