-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
36 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import '@testing-library/jest-dom/extend-expect' | ||
import '@testing-library/jest-dom/jest-globals' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,38 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM node:18-bookworm-slim | ||
ARG DEBIAN_FRONTEND=noninteractive USER=appuser | ||
ENV APPUSER=$USER LANG=C.UTF-8 LC_ALL=C.UTF-8 NEXT_TELEMETRY_DISABLED=1 NODE_ENV="development" PATH="$PATH:./node_modules/.bin" TZ='Europe/Rome' WORKDIR=/app | ||
FROM node:18-bullseye-slim | ||
ARG DEBIAN_FRONTEND=noninteractive GROUP_ID=1001 USER=appuser | ||
ENV APPUSER=$USER \ | ||
CYPRESS_CACHE_FOLDER="/tmp/.cache/Cypress" \ | ||
LANG=C.UTF-8 \ | ||
LC_ALL=C.UTF-8 \ | ||
NEXT_TELEMETRY_DISABLED=1 \ | ||
NODE_ENV="development" \ | ||
PATH="$PATH:./node_modules/.bin" \ | ||
TZ='Europe/Rome' \ | ||
WORKDIR=/app | ||
RUN apt-get update \ | ||
&& apt-get install --assume-yes --no-install-recommends \ | ||
g++ \ | ||
make \ | ||
python3 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR $WORKDIR | ||
RUN addgroup --system --gid 1001 $APPUSER | ||
RUN adduser --system --uid 1001 $APPUSER | ||
RUN chown $APPUSER:$APPUSER $WORKDIR | ||
USER $APPUSER | ||
COPY --chown=$APPUSER ./scripts/test.sh jest.config.js middleware.ts next.config.js package.json tsconfig.json yarn.lock ./ | ||
RUN addgroup --system --gid $GROUP_ID $APPUSER | ||
RUN adduser --system --uid $GROUP_ID $APPUSER | ||
RUN chown $GROUP_ID:$APPUSER $WORKDIR | ||
USER $GROUP_ID:$USER_ID | ||
COPY --chown=$APPUSER \ | ||
./scripts/test.sh \ | ||
.eslintrc.json \ | ||
.prettierrc.json \ | ||
jest.config.js \ | ||
middleware.ts \ | ||
next.config.js \ | ||
package.json \ | ||
tsconfig.json \ | ||
yarn.lock \ | ||
./ | ||
ENTRYPOINT ["./test.sh"] | ||
CMD yarn ci:contract-test && yarn ci:unit-test | ||
LABEL company="20tab" project="{{ cookiecutter.project_slug }}" service="frontend" stage="test" |