Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/add-test-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 24

- name: Install dependencies
run: |
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc
yarn --frozen-lockfile
npm ci

- name: Extract tests from origin branch
run: |
yarn extract tests.txt
npm run extract tests.txt
cat tests.txt | sort > origin_tests.txt
rm tests.txt
env:
Expand All @@ -34,8 +34,8 @@ jobs:
git fetch origin ${{ github.base_ref }}
git checkout ${{ github.base_ref }}
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc
yarn --frozen-lockfile
yarn extract tests.txt
npm ci
npm run extract tests.txt
cat tests.txt | sort > destination_tests.txt
rm tests.txt
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/generate-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
- name: "Install Node"
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 24
- name: Install dependencies
run: |
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc
yarn
npm ci
- name: "Generate Coverage"
run: |
yarn coverage
npm run coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
- name: "Install Node"
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 24
- name: Install dependencies
run: |
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc
yarn
npm ci
- name: "Run Test"
run: yarn test
run: npm run test
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v24
52 changes: 24 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
FROM node:18.17.1-alpine AS node
FROM alpine:3.16 as base
FROM node:24-alpine3.22 AS builder

COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/share /usr/local/share
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin
WORKDIR /app

ARG NPM_TOKEN
RUN echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
RUN apk add yarn
COPY package.json ./
COPY yarn.lock ./
RUN yarn --ignore-scripts
RUN rm -f .npmrc
COPY package.json package-lock.json ./

RUN echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc && \
npm ci && \
rm -f .npmrc

COPY . .

RUN yarn global add npm-run-all
RUN yarn build
RUN npm run build

FROM node:18.17.1-alpine AS web
FROM node:24-alpine3.22 AS runner

COPY --from=base /dist /app/build
COPY package*.json /app/
COPY yarn.lock /app/
COPY --from=base /src/routes /app/src/routes
COPY --from=base /.git/HEAD /app/.git/HEAD
COPY --from=base /.git/refs /app/.git/refs
WORKDIR /app
RUN apk add yarn
ARG NPM_TOKEN
RUN echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
RUN --mount=type=cache,target=/yarn-cache yarn --prod --ignore-scripts --cache-folder /yarn-cache
RUN rm -f .npmrc
CMD node build/index.js
ENV NODE_ENV=production

COPY --from=builder /app/package*.json ./
COPY --from=builder /app/dist ./build
COPY --from=builder /app/src/routes ./src/routes
COPY --from=builder /app/.git/HEAD ./.git/HEAD
COPY --from=builder /app/.git/refs ./.git/refs

ARG NPM_TOKEN
RUN echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc && \
npm ci --omit=dev --ignore-scripts && \
rm -f .npmrc && \
npm cache clean --force

CMD ["node", "build/index.js"]
Loading
Loading