Skip to content

Commit

Permalink
Finish release/2022-04
Browse files Browse the repository at this point in the history
Release/2022 04
  • Loading branch information
dragos-dobre authored May 18, 2022
2 parents de75001 + f7b0590 commit 95aa090
Show file tree
Hide file tree
Showing 29 changed files with 954 additions and 372 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main & develop branch
pull_request:
branches: [main, develop]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
name: Setup node v16
with:
node-version: "16"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: cache # use this to check for `cache-hit` (`steps.cache.outputs.cache-hit != 'true'`)
with:
path: |
**/node_modules
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Check package.json
run: yarn check-package

# Runs a single command using the runners shell
- name: Prepare openIMIS Dependencies
run: yarn load-config

- name: Install dependencies
run: yarn install # Since we edit package.json with the openIMIS deps, we cannot use --frozen-lockfile

- name: Build
run: yarn build

- uses: actions/upload-artifact@v2
with:
name: frontend-${{github.run_number}}-${{github.sha}}
path: ./build/*
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build

on:
push:
branches:
- main
- develop

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
name: Setup node v16
with:
node-version: "16"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: cache # use this to check for `cache-hit` (`steps.cache.outputs.cache-hit != 'true'`)
with:
path: |
**/node_modules
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Check package.json
run: yarn check-package

# Runs a single command using the runners shell
- name: Prepare openIMIS Dependencies
run: yarn load-config

- name: Install dependencies
run: yarn install # Since we edit package.json with the openIMIS deps, we cannot use --frozen-lockfile

- name: Build
run: yarn build

- uses: actions/upload-artifact@v2
with:
name: frontend-${GITHUB_REF_NAME_SLUG}-${{github.sha}}
path: ./build/*
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
node_modules
build
yarn*
yarn-error.log
modules-installs.txt
modules-links.txt
modules-removes.txt
modules-unlinks.txt
src/modules.js
src/locales.js
.idea
package-lock.json
yarn.lock
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "all",
"printWidth": 120,
"quoteProps": "preserve",
"arrowParens": "always"
}
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ COPY ./ /app
WORKDIR /app
ARG OPENIMIS_CONF_JSON
ENV OPENIMIS_CONF_JSON=${OPENIMIS_CONF_JSON}
RUN node openimis-config.js
#RUN . ./modules-adds.txt
#RUN . ./modules-installs.txt
RUN yarn load-config
RUN yarn install
RUN yarn build
RUN yarn global add serve
Expand Down
Loading

0 comments on commit 95aa090

Please sign in to comment.