Skip to content

Commit 3acb7a4

Browse files
Npm publish preparation (#72)
* feat: add package json information * v1.0.0 * feat: add types to package json improved docker environment * v1.0.1 * fix: use 1.0.1 in dependencies * fix: order in github action fixed Need build BEFORE test because we need to have all dist folders. * fix: order in dockerfile fixed Need build BEFORE test because we need to have all dist folders. * fix: ignore dist folder in docker * fix: cache dist folders * fix: ci clean up * Revert "fix: ci clean up" This reverts commit b241e34. * fix: fix ci caching * fix: enhance ci.yml using variables * Revert "fix: enhance ci.yml using variables" This reverts commit cafba6f. * fix: chore in ci.yml
1 parent 19df7e9 commit 3acb7a4

File tree

254 files changed

+566
-91087
lines changed

Some content is hidden

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

254 files changed

+566
-91087
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
node_modules
2+
npm-debug.log
23
dist
4+
Dockerfile*
5+
docker-compose*
6+
.dockerignore
7+
.git
8+
.github
9+
.gitignore
10+
README.md
11+
LICENSE
12+
.vscode
13+
.nx

.github/workflows/ci.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Cache node_modules
2727
uses: actions/cache@v4
2828
with:
29-
path: node_modules
29+
path: '**/node_modules'
3030
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
3131
restore-keys: |
3232
${{ runner.os }}-node-
@@ -48,16 +48,14 @@ jobs:
4848
with:
4949
node-version: 20
5050

51-
- name: Cache node_modules
52-
uses: actions/cache@v4
51+
- name: Restore Cache node_modules
52+
uses: actions/cache/restore@v4
5353
with:
54-
path: node_modules
54+
path: '**/node_modules'
5555
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
56-
restore-keys: |
57-
${{ runner.os }}-node-
5856

5957
- name: Run Lint
60-
run: npm run lint # Stelle sicher, dass du ein Lint-Skript in deinem package.json hast
58+
run: npm run lint
6159

6260
build:
6361
runs-on: ubuntu-latest
@@ -73,21 +71,25 @@ jobs:
7371
with:
7472
node-version: 20
7573

76-
- name: Cache node_modules
77-
uses: actions/cache@v4
74+
- name: Restore Cache node_modules
75+
uses: actions/cache/restore@v4
7876
with:
79-
path: node_modules
77+
path: '**/node_modules'
8078
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
81-
restore-keys: |
82-
${{ runner.os }}-node-
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') }}
8385

8486
- name: Run Build
8587
run: npm run build
8688

8789
test:
8890
runs-on: ubuntu-latest
8991
needs:
90-
- install
92+
- build
9193

9294
steps:
9395
- name: Checkout code
@@ -98,13 +100,17 @@ jobs:
98100
with:
99101
node-version: 20
100102

101-
- name: Cache node_modules
102-
uses: actions/cache@v4
103+
- name: Restore Cache node_modules
104+
uses: actions/cache/restore@v4
103105
with:
104-
path: node_modules
106+
path: '**/node_modules'
105107
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
106-
restore-keys: |
107-
${{ runner.os }}-node-
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') }}
108114

109115
- name: Run CI Checks
110116
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
src
3+
.nx

Dockerfile

Lines changed: 0 additions & 16 deletions
This file was deleted.
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+

apps/auth/package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"name": "@apps/auth",
3-
"version": "0.1.0",
3+
"version": "1.0.1",
44
"private": true,
5+
"homepage": "https://github.com/DATEV-Research/",
6+
"author": "DATEV eG <[email protected]> (https://www.datev.de/)",
7+
"license": "MIT",
8+
"repository": "github:DATEV-Research/Solid-authorization-app",
59
"scripts": {
610
"serve": "vue-cli-service serve",
711
"build": "vue-cli-service build",
@@ -10,12 +14,12 @@
1014
"lint": "vue-cli-service lint"
1115
},
1216
"dependencies": {
13-
"@datev-research/mandat-shared-components": "^1.0.0",
14-
"@datev-research/mandat-shared-composables": "^1.0.0",
15-
"@datev-research/mandat-shared-utils": "^1.0.0",
16-
"@datev-research/mandat-shared-solid-interop": "^1.0.0",
17-
"@datev-research/mandat-shared-solid-requests": "^1.0.0",
18-
"@datev-research/mandat-shared-theme": "^1.0.0",
17+
"@datev-research/mandat-shared-components": "^1.0.1",
18+
"@datev-research/mandat-shared-composables": "^1.0.1",
19+
"@datev-research/mandat-shared-solid-interop": "^1.0.1",
20+
"@datev-research/mandat-shared-solid-requests": "^1.0.1",
21+
"@datev-research/mandat-shared-theme": "^1.0.1",
22+
"@datev-research/mandat-shared-utils": "^1.0.1",
1923
"@vueuse/components": "^11.3.0",
2024
"@vueuse/core": "^11.3.0",
2125
"axios": "^1.7.8",

apps/lisa/.dockerignore

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

0 commit comments

Comments
 (0)