Skip to content

Commit

Permalink
Merge pull request #57 from RIKEN-RCCS/maintenance2022
Browse files Browse the repository at this point in the history
Maintenance2022
  • Loading branch information
so5 authored Oct 27, 2024
2 parents e76f688 + afb8eb8 commit a943e94
Show file tree
Hide file tree
Showing 151 changed files with 24,195 additions and 28,474 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
docs
documentMD
*/node_modules
**/node_modules
bin
server/coverage
client/bin
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/run_cypress.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Cypress Tests
on:
on:
push:
branches:
branches:
- '**'
- '!master'
jobs:
Expand All @@ -27,7 +27,6 @@ jobs:
node-version: [20.x]
steps:
- run: mkdir -p ~/.wheel

- run: >
echo '[{
"name": "${{ secrets.WHEEL_TEST_REMOTEHOST }}",
Expand All @@ -46,22 +45,14 @@ jobs:
"maxStatusCheckError": 10,
"readyTimeout": 5000
}]' > ~/.wheel/remotehost.json
- run: cat ~/.wheel/remotehost.json

- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm

- run: npm install cypress
- run: npm install simple-ssh
- run: npm install @cypress/webpack-preprocessor
- run: npm install cypress-delete-downloads-folder

- run: npm install
- name: Cypress run
uses: cypress-io/github-action@v6
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
working-directory: ./server
- run: npm run test
working-directory: ./server
- run: echo "VERSION_NUMBER=`date '+%Y-%m%d-%H%M%S'`" >>$GITHUB_ENV
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ WORKDIR /usr/src/
# to install phantomjs
RUN apt-get update && apt -y install bzip2 python3 g++ build-essential
# build WHEEL
COPY package.json package.json
COPY server server
RUN cd server && npm install --omit=dev
COPY client client
RUN cd client; npm install; npm run build
RUN npm install
RUN npm install -w server -w client

#build base image to run WHEEL
FROM --platform=linux/amd64 node:20-slim AS base
Expand All @@ -18,12 +19,14 @@ RUN apt-get update && apt -y install curl git rsync openssh-server &&\
apt -y install git-lfs &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/src/node_modules /usr/src/node_modules
COPY --from=builder /usr/src/server /usr/src/server
RUN rm -fr server/app/config/*

# run UT
FROM base AS ut
WORKDIR /usr/src/server
RUN apt-get update && apt -y install python3 g++ build-essential
RUN npm install cross-env\
chai chai-as-promised chai-fs chai-iterator chai-json-schema deep-equal-in-any-order\
mocha nyc rewire sinon sinon-chai
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,29 @@ RIKEN R-CCS forks it and continues the development

## For developpers
### Directory structure
we have 3 main directories at top level
we have 4 main directories at top level

- documentMD
- client
- server
- test

"documentMD" contains documents written in markdown.
Only files under `documentMD/user_guide` will be converted to html and be publishd at github.io pages
when pull request will be merged to master branch
Any other markdown files under documentMD is detailed informatin for developpers

"client" and "server" has client and server code respectively.
"test" contains E2E test code based on cypress, you can find server-side unit test code under server/test

### preparation
run following commands
1. npm install
2. npm run build (install dependent modules for server and client code)
3. cd test; npm install (install e2e test modules)

please read test/README.md for E2E test preparation

### How to run without docker
1. install and build
```
> npm build
```
2. start server
```
> cd server
> npm start
```

### CI/CD process
when you push new commit to github, server/app/db/version.json will be updated during CI/CD process.
Expand Down
Loading

0 comments on commit a943e94

Please sign in to comment.