generated from networkservicemesh/cmd-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vitaliy Guschin <[email protected]>
- Loading branch information
Vitaliy Guschin
committed
Dec 6, 2023
1 parent
b51c987
commit 2454d5a
Showing
37 changed files
with
4,455 additions
and
352 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['react-refresh'], | ||
rules: { | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: React Build & Test | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
required: true | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build Docker image | ||
run: docker build -t dashboard-ui . | ||
|
||
- name: Run tests | ||
run: | | ||
docker run --rm -d -p 3000:3000 --name dashboard-ui-container dashboard-ui | ||
sleep 10 # Wait for the application to start | ||
docker exec dashboard-ui-container curl -I http://localhost:3000 | ||
docker stop dashboard-ui-container | ||
- name: Cleanup | ||
run: docker rmi dashboard-ui |
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,24 @@ | ||
--- | ||
name: React lint | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
react-lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run lint | ||
run: npm run lint |
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 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 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 |
---|---|---|
|
@@ -16,3 +16,8 @@ | |
|
||
.idea/ | ||
junit/ | ||
node_modules | ||
build | ||
nohup.out | ||
.DS_Store | ||
.vscode |
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 @@ | ||
20.9.0 |
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,10 @@ | ||
FROM golang:1.20.5-buster as go | ||
ENV GO111MODULE=on | ||
ENV CGO_ENABLED=0 | ||
ENV GOBIN=/bin | ||
RUN go install github.com/go-delve/delve/cmd/[email protected] | ||
ADD https://github.com/spiffe/spire/releases/download/v1.2.2/spire-1.2.2-linux-x86_64-glibc.tar.gz . | ||
RUN tar xzvf spire-1.2.2-linux-x86_64-glibc.tar.gz -C /bin --strip=2 spire-1.2.2/bin/spire-server spire-1.2.2/bin/spire-agent | ||
FROM node:20.9.0 | ||
|
||
FROM go as build | ||
WORKDIR /build | ||
WORKDIR /app | ||
COPY . . | ||
RUN go build -o /bin/app . | ||
|
||
FROM build as test | ||
CMD go test -test.v ./... | ||
RUN npm install | ||
|
||
FROM test as debug | ||
CMD dlv -l :40000 --headless=true --api-version=2 test -test.v ./... | ||
EXPOSE 3000 | ||
|
||
FROM alpine as runtime | ||
COPY --from=build /bin/app /bin/app | ||
CMD /bin/app | ||
CMD ["npm", "run", "dev"] |
Oops, something went wrong.