-
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,194 additions
and
11,747 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 |
---|---|---|
@@ -1,9 +1,6 @@ | ||
name: Test coverage for pull request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
@@ -21,11 +18,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 |
---|---|---|
@@ -1,35 +1,30 @@ | ||
name: Test for merged commit | ||
|
||
on: | ||
push: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Prepare yarn | ||
run: corepack enable && corepack prepare [email protected] --activate | ||
|
||
- name: Setup NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
||
- 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 }}- | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
- run: npm ci | ||
- run: npm run test -- --maxWorkers=100% | ||
- name: Run tests | ||
run: yarn test --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.