Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAAR-1031 Major dependency updates #34

Merged
merged 9 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@
"functions": "never"
}
],
"import/no-extraneous-dependencies": ["error", { "devDependencies": ["**/*.test.js", "**/*.test.ts"] }],
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["**/*.test.js", "**/*.test.ts", "cypress.config.ts"] }
],
"prettier/prettier": [
"error",
{
Expand Down
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ ENV TZ=Europe/London
RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" > /etc/timezone

RUN addgroup --gid 2000 --system appgroup && \
adduser --uid 2000 --system appuser --gid 2000
adduser --uid 2000 --system appuser --gid 2000

WORKDIR /app

# Cache breaking
ENV BUILD_NUMBER ${BUILD_NUMBER:-1_0_0}

RUN apt-get update && \
apt-get upgrade -y && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
apt-get upgrade -y && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

# Stage: build assets
FROM base as build
Expand All @@ -29,7 +29,7 @@ ARG BUILD_NUMBER=1_0_0
ARG GIT_REF=not-available

RUN apt-get update && \
apt-get install -y make python g++
apt-get install -y make python g++

COPY package*.json ./
RUN CYPRESS_INSTALL_BINARY=0 npm ci --no-audit
Expand All @@ -38,8 +38,8 @@ COPY . .
RUN npm run build

RUN export BUILD_NUMBER=${BUILD_NUMBER} && \
export GIT_REF=${GIT_REF} && \
npm run record-build-info
export GIT_REF=${GIT_REF} && \
npm run record-build-info

RUN npm prune --no-audit --production

Expand All @@ -63,7 +63,7 @@ COPY --from=build --chown=appuser:appgroup \
COPY --from=build --chown=appuser:appgroup \
/app/node_modules ./node_modules

EXPOSE 3000 3001
EXPOSE 3000
ENV NODE_ENV='production'
USER 2000

Expand Down
24 changes: 24 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { defineConfig } from 'cypress'
import setupNodeEvents from './integration_tests/plugins/index'

export default defineConfig({
chromeWebSecurity: false,
fixturesFolder: 'integration_tests/fixtures',
screenshotsFolder: 'integration_tests/screenshots',
videosFolder: 'integration_tests/videos',
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json',
},
videoUploadOnPasses: false,
taskTimeout: 60000,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents,
baseUrl: 'http://localhost:3007',
excludeSpecPattern: '**/!(*.cy).ts',
specPattern: 'integration_tests/integration/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'integration_tests/support/index.ts',
},
})
17 changes: 0 additions & 17 deletions cypress.json

This file was deleted.

5 changes: 3 additions & 2 deletions integration_tests/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"plugins": ["cypress"],
"plugins": ["cypress", "no-only-tests"],
"env": {
"cypress/globals": true
},
"extends": ["plugin:cypress/recommended"],
"rules": {
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}]
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
"no-only-tests/no-only-tests": "error"
}
}
Loading