Skip to content

Commit c3da824

Browse files
authored
Merge pull request #132 from teknologi-umum/chore/bump-node-20
chore: bump to nodejs 20
2 parents 2661f3a + 5203a64 commit c3da824

File tree

15 files changed

+664
-744
lines changed

15 files changed

+664
-744
lines changed

.github/workflows/ci.yml

+7-68
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
ci:
99
name: CI
1010
runs-on: ubuntu-latest
11-
container: node:18.16-bullseye
11+
container: node:20.10-bookworm
1212
timeout-minutes: 15
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Install pnpm
1818
uses: pnpm/action-setup@v2
@@ -21,19 +21,6 @@ jobs:
2121
version: latest
2222
run_install: false
2323

24-
- name: Get pnpm store directory
25-
id: pnpm-cache
26-
run: |
27-
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
28-
29-
- uses: actions/cache@v3
30-
name: Setup pnpm cache
31-
with:
32-
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
33-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34-
restore-keys: |
35-
${{ runner.os }}-pnpm-store-
36-
3724
- name: Install dependencies
3825
run: pnpm install
3926

@@ -72,21 +59,21 @@ jobs:
7259
packages: write
7360
steps:
7461
- name: Checkout code
75-
uses: actions/checkout@v3
62+
uses: actions/checkout@v4
7663

7764
- name: Set up Docker Buildx
78-
uses: docker/setup-buildx-action@v2
65+
uses: docker/setup-buildx-action@v3
7966

8067
- name: Log in to the Container registry
81-
uses: docker/login-action@v2
68+
uses: docker/login-action@v3
8269
with:
8370
registry: ghcr.io
8471
username: ${{ github.actor }}
8572
password: ${{ secrets.GITHUB_TOKEN }}
8673

8774
- name: Extract metadata (tags, labels) for Docker
8875
id: meta
89-
uses: docker/metadata-action@v4
76+
uses: docker/metadata-action@v5
9077
with:
9178
images: ghcr.io/teknologi-umum/graphene
9279
flavor: |
@@ -96,57 +83,9 @@ jobs:
9683
type=sha
9784
9885
- name: Build and push Docker image
99-
uses: docker/build-push-action@v3
86+
uses: docker/build-push-action@v5
10087
with:
10188
context: .
10289
push: true
10390
tags: ${{ steps.meta.outputs.tags }}
10491
labels: ${{ steps.meta.outputs.labels }}
105-
106-
cd-trigger:
107-
name: CD - Trigger
108-
runs-on: ubuntu-latest
109-
container: debian:bullseye
110-
timeout-minutes: 120
111-
needs:
112-
- cd-build
113-
steps:
114-
- name: Install required packages
115-
run: apt-get update && apt-get upgrade -y && apt-get install -y tar gzip curl ssh
116-
117-
- name: Register SSH key
118-
uses: shimataro/ssh-key-action@v2
119-
with:
120-
key: ${{ secrets.SSH_KEY }}
121-
name: id_ed25519
122-
known_hosts: ${{ secrets.SSH_IP }}
123-
if_key_exists: replace
124-
125-
- name: SSH Keyscan
126-
run: ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.SSH_IP }} >> /root/.ssh/known_hosts
127-
128-
- name: Pull latest code
129-
run: >
130-
ssh
131-
-i /root/.ssh/id_ed25519
132-
-p ${{ secrets.SSH_PORT }}
133-
-t ${{ secrets.SSH_USER }}@${{ secrets.SSH_IP }}
134-
'ssh graphene "cd ${{ secrets.SSH_WORKDIR }}/graphene && git pull" '
135-
- name: Build Docker images
136-
run: >
137-
ssh
138-
-i /root/.ssh/id_ed25519
139-
-p ${{ secrets.SSH_PORT }}
140-
-t ${{ secrets.SSH_USER }}@${{ secrets.SSH_IP }}
141-
"ssh graphene 'echo ${{ secrets.SSH_PASSWORD }} | sudo -S bash -c '\"'cd ${{ secrets.SSH_WORKDIR }}/graphene &&
142-
docker compose up -d --pull always graphene'\"' ' "
143-
144-
- name: Clean up docker artifacts
145-
run: >
146-
ssh
147-
-i /root/.ssh/id_ed25519
148-
-p ${{ secrets.SSH_PORT }}
149-
-t ${{ secrets.SSH_USER }}@${{ secrets.SSH_IP }}
150-
"ssh pesto 'echo ${{ secrets.SSH_PASSWORD }} | sudo -S bash -c '\"'docker container prune -f &&
151-
docker image prune -f &&
152-
docker builder prune -f '\"' ' "

.github/workflows/pr.yml

+2-15
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
ci:
99
name: CI
1010
runs-on: ubuntu-latest
11-
container: node:18.16-bullseye
11+
container: node:20.10-bookworm
1212
timeout-minutes: 15
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Install pnpm
1818
uses: pnpm/action-setup@v2
@@ -21,19 +21,6 @@ jobs:
2121
version: latest
2222
run_install: false
2323

24-
- name: Get pnpm store directory
25-
id: pnpm-cache
26-
run: |
27-
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
28-
29-
- uses: actions/cache@v3
30-
name: Setup pnpm cache
31-
with:
32-
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
33-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
34-
restore-keys: |
35-
${{ runner.os }}-pnpm-store-
36-
3724
- name: Install dependencies
3825
run: pnpm install
3926

.github/workflows/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ jobs:
1515
packages: write
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v2
21+
uses: docker/setup-buildx-action@v3
2222

2323
- name: Log in to the Container registry
24-
uses: docker/login-action@v2
24+
uses: docker/login-action@v3
2525
with:
2626
registry: ghcr.io
2727
username: ${{ github.actor }}
2828
password: ${{ secrets.GITHUB_TOKEN }}
2929

3030
- name: Extract metadata (tags, labels) for Docker
3131
id: meta
32-
uses: docker/metadata-action@v4
32+
uses: docker/metadata-action@v5
3333
with:
3434
images: ghcr.io/teknologi-umum/graphene
3535
flavor: |
@@ -38,7 +38,7 @@ jobs:
3838
type=semver,pattern={{version}}
3939
4040
- name: Build and push Docker image
41-
uses: docker/build-push-action@v3
41+
uses: docker/build-push-action@v5
4242
with:
4343
context: .
4444
push: true

.idea/.gitignore

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/graphene.iml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.16.0
1+
v20

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM node:18.16-bullseye
1+
FROM node:20.10-bookworm
22

33
WORKDIR /home/app
44

5-
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
5+
RUN npm install --global pnpm
66

77
COPY fonts/ /usr/local/share/fonts/
88

LICENSE

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
2-
3-
Copyright (c) 2021 Elianiva
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1+
MIT License
2+
3+
Copyright (c) 2023 Teknologi Umum <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.

packages/backend/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@types/supertest": "2.0.12",
4545
"@typescript-eslint/eslint-plugin": "5.59.7",
4646
"@typescript-eslint/parser": "5.59.7",
47-
"@vitest/coverage-c8": "^0.33.0",
47+
"@vitest/coverage-v8": "^1.1.0",
4848
"c8": "^8.0.1",
4949
"esbuild": "0.17.19",
5050
"eslint": "8.41.0",
@@ -59,6 +59,6 @@
5959
},
6060
"engineStrict": true,
6161
"engines": {
62-
"node": ">=18.6.0"
62+
"node": ">=20.9.0"
6363
}
6464
}

packages/frontend/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

0 commit comments

Comments
 (0)