-
Notifications
You must be signed in to change notification settings - Fork 0
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
10 changed files
with
9,201 additions
and
11,737 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,14 @@ jobs: | |
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Prepare yarn | ||
run: corepack enable && corepack prepare [email protected] --activate | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
run: yarn install --immutable | ||
|
||
- name: Run tests | ||
run: npm run test:cov -- --maxWorkers=100% | ||
run: yarn test:cov --maxWorkers=100% | ||
|
||
- name: Coverage | ||
uses: coverallsapp/[email protected] | ||
|
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 |
---|---|---|
|
@@ -21,15 +21,28 @@ jobs: | |
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
||
- name: Prepare yarn | ||
run: corepack enable && corepack prepare [email protected] --activate | ||
|
||
- name: Get yarn version | ||
id: yarn-version | ||
run: echo "YARN_VERSION=$(yarn -v)" >> $GITHUB_OUTPUT | ||
|
||
- name: Get cache dir path | ||
id: yarn-cache-dir-path | ||
run: echo "CACHE_DIR=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- run: npm ci | ||
- run: npm run test -- --maxWorkers=100% | ||
path: ${{ steps.yarn-cache-dir-path.outputs.CACHE_DIR }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ steps.yarn-version.outputs.YARN_VERSION }} | ||
restore-keys: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }}- | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Run tests | ||
run: yarn test:cov --maxWorkers=100% |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
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 |
---|---|---|
|
@@ -3,21 +3,23 @@ FROM node:20-alpine as builder | |
ENV NODE_ENV build | ||
WORKDIR /sight | ||
|
||
COPY ./ /sight | ||
COPY . . | ||
|
||
RUN npm ci | ||
RUN npm run build \ | ||
&& npm prune --production | ||
RUN corepack enable && corepack prepare [email protected] --activate | ||
RUN yarn install --immutable | ||
RUN yarn build | ||
|
||
FROM node:20-alpine | ||
|
||
ENV NODE_ENV production | ||
WORKDIR /sight | ||
|
||
COPY --from=builder /sight/package*.json ./ | ||
RUN corepack enable && corepack prepare [email protected] --activate | ||
|
||
COPY --from=builder /sight/package.json /sight/yarn.lock ./ | ||
COPY --from=builder /sight/.env.* ./ | ||
COPY --from=builder /sight/node_modules/ ./node_modules/ | ||
COPY --from=builder /sight/dist/ ./dist/ | ||
|
||
EXPOSE 3000 | ||
CMD ["npm", "run", "start:prod"] | ||
CMD ["yarn", "start:prod"] |
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 |
---|---|---|
|
@@ -5,8 +5,10 @@ FROM node:20-alpine | |
|
||
WORKDIR /sight | ||
|
||
COPY package*.json ./ | ||
RUN npm ci | ||
RUN corepack enable && corepack prepare [email protected] --activate | ||
COPY package.json yarn.lock .yarnrc.yml ./ | ||
|
||
RUN yarn install | ||
|
||
EXPOSE 3000 | ||
CMD ["npm", "run", "start:dev"] | ||
CMD ["yarn", "start:dev"] |
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
Oops, something went wrong.