Skip to content

Commit b332dad

Browse files
Merge remote-tracking branch 'origin/npm-publish-preparation' into styling-changes
2 parents 352a8f0 + 2ea4403 commit b332dad

File tree

202 files changed

+23829
-45594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+23829
-45594
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
node_modules
22
npm-debug.log
3+
dist
34
Dockerfile*
45
docker-compose*
56
.dockerignore
67
.git
8+
.github
79
.gitignore
810
README.md
911
LICENSE
10-
.vscode
12+
.vscode
13+
.nx

.github/workflows/ci.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- market
8+
push:
9+
branches:
10+
- main
11+
- market
12+
13+
jobs:
14+
install:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
26+
- name: Cache node_modules
27+
uses: actions/cache@v4
28+
with:
29+
path: '**/node_modules'
30+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
31+
restore-keys: |
32+
${{ runner.os }}-node-
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
lint:
38+
runs-on: ubuntu-latest
39+
needs:
40+
- install
41+
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
46+
- name: Set up Node.js
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: 20
50+
51+
- name: Restore Cache node_modules
52+
uses: actions/cache/restore@v4
53+
with:
54+
path: '**/node_modules'
55+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
56+
57+
- name: Run Lint
58+
run: npm run lint
59+
60+
build:
61+
runs-on: ubuntu-latest
62+
needs:
63+
- install
64+
65+
steps:
66+
- name: Checkout code
67+
uses: actions/checkout@v4
68+
69+
- name: Set up Node.js
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: 20
73+
74+
- name: Restore Cache node_modules
75+
uses: actions/cache/restore@v4
76+
with:
77+
path: '**/node_modules'
78+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
79+
80+
- name: Cache dist
81+
uses: actions/cache/save@v4
82+
with:
83+
path: 'libs/*/dist'
84+
key: ${{ runner.os }}-dist-${{ hashFiles('libs/*/dist') }}
85+
86+
- name: Run Build
87+
run: npm run build
88+
89+
test:
90+
runs-on: ubuntu-latest
91+
needs:
92+
- build
93+
94+
steps:
95+
- name: Checkout code
96+
uses: actions/checkout@v4
97+
98+
- name: Set up Node.js
99+
uses: actions/setup-node@v4
100+
with:
101+
node-version: 20
102+
103+
- name: Restore Cache node_modules
104+
uses: actions/cache/restore@v4
105+
with:
106+
path: '**/node_modules'
107+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
108+
109+
- name: Restore Cache dist
110+
uses: actions/cache/restore@v4
111+
with:
112+
path: 'libs/*/dist'
113+
key: ${{ runner.os }}-dist-${{ hashFiles('libs/*/dist') }}
114+
115+
- name: Run CI Checks
116+
run: npm run test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.DS_Store
22
node_modules
3-
/dist
3+
dist
44

55

66
# local env files
@@ -16,6 +16,7 @@ pnpm-debug.log*
1616
# Editor directories and files
1717
.idea
1818
.vscode
19+
.nx
1920
*.suo
2021
*.ntvs*
2122
*.njsproj

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
src
3+
.nx

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# build stage
2-
FROM node:12-alpine3.12 as build-stage
2+
FROM node:20-alpine as build-stage
3+
34
WORKDIR /app
45
COPY package*.json ./
6+
COPY .npmrc ./
57
RUN npm install
68
COPY . .
7-
RUN npm run build
9+
RUN npm run lint && \
10+
npm run build && \
11+
npm run test
812

913
# production stage
1014
FROM nginx:stable-alpine as production-stage
1115
COPY --from=build-stage /app/dist /usr/share/nginx/html
12-
COPY prod_nginx.conf /etc/nginx/nginx.conf
16+
# COPY prod_nginx.conf /etc/nginx/nginx.conf
1317
EXPOSE 80
14-
CMD ["nginx", "-g", "daemon off;"]
18+
CMD ["nginx", "-g", "daemon off;"]

Dockerfile-lib

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# build stage
2+
FROM node:20-alpine as build-stage
3+
4+
WORKDIR /app
5+
COPY package*.json ./
6+
RUN npm install
7+
COPY . .
8+
RUN npm run build
9+

Dockerfile-mono

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM node:20-alpine as install-stage
2+
3+
WORKDIR /app
4+
COPY . .
5+
6+
RUN npm ci
7+
8+
FROM node:20-alpine as build-stage
9+
COPY --from=install-stage /app /app
10+
WORKDIR /app
11+
12+
RUN npm run lint && \
13+
npm run test
14+
15+
FROM node:20-alpine as build-stage
16+
COPY --from=install-stage /app /app
17+
WORKDIR /app
18+
19+
RUN npm run build
20+
21+
FROM node:20-alpine as run-stage
22+
COPY --from=build-stage /app /app
23+
WORKDIR /app
24+
25+
EXPOSE 8081
26+
EXPOSE 8082
27+
EXPOSE 8083
28+
EXPOSE 8084
29+
30+
CMD ["npm", "start"]
31+
32+

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# MANDAT Hackathon Demo
22

3+
[![CI](https://github.com/mandat-project/hackathon-demo/actions/workflows/ci.yml/badge.svg?branch=market)](https://github.com/mandat-project/hackathon-demo/actions/workflows/ci.yml)
4+
35
In this demo, we showcase the initialisation of a business contract between the SME and the BANK in form of a credit
46
grant.
57
An overview of the current state is provided in Figure 1, where the starting point is indicated by step 0 "create

apps/auth/.editorconfig

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)