-
Notifications
You must be signed in to change notification settings - Fork 38
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
11 changed files
with
3,999 additions
and
3,348 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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
!config/locales | ||
!src | ||
!package.json | ||
!.yarnclean | ||
!yarn.lock | ||
!pnpm-lock.yaml | ||
!tsconfig.json | ||
!tsconfig.release.json |
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,26 @@ | ||
name: setup | ||
description: Setup Node and install dependencies | ||
|
||
inputs: | ||
node_version: | ||
description: Node Version | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Use pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
||
- name: Use Node.js ${{ inputs.node_version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: 'pnpm' | ||
node-version: ${{ inputs.node_version }} | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: 🔧 Install dependencies | ||
shell: bash | ||
run: pnpm install --frozen-lockfile --strict-peer-dependencies |
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main, next, 'release/**'] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 📥 Checkout Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: ⚙ Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
node_version: 20.x | ||
|
||
- name: 🎈 Lint and test | ||
run: | | ||
pnpm run format:check | ||
pnpm run lint | ||
pnpm run test | ||
- name: ⛳ SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} |
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 was deleted.
Oops, something went wrong.
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,22 +1,23 @@ | ||
FROM node:20-slim as base | ||
LABEL maintainer="Utarwyn <maxime.malgorn@laposte.net>" | ||
|
||
RUN mkdir /app && chown -R node:node /app | ||
WORKDIR /app | ||
|
||
#################################################################################################### | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
FROM base as build | ||
|
||
COPY --chown=node:node . /app | ||
RUN yarn install --silent --pure-lockfile && yarn build && rm -rf node_modules && yarn install --production --silent --pure-lockfile && yarn cache clean | ||
RUN corepack enable | ||
COPY . /app | ||
WORKDIR /app | ||
|
||
#################################################################################################### | ||
FROM base AS prod-deps | ||
RUN pnpm install --prod --frozen-lockfile | ||
|
||
FROM base as release | ||
FROM base AS build | ||
RUN pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
|
||
COPY --from=build --chown=node:node /app . | ||
FROM base | ||
COPY --from=prod-deps /app/node_modules /app/node_modules | ||
COPY --from=build /app/dist /app/dist | ||
|
||
USER node | ||
ENV NODE_ENV=production | ||
CMD ["yarn", "serve"] | ||
CMD ["pnpm", "serve"] |
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.