Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
# Javascript Node CircleCI 2.0 configuration file
# Javascript Node CircleCI 2.1 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
# Check https://circleci.com/docs/2.1/language-javascript/ for more details
#
version: 2.1
jobs:
build:
docker:
# specify the version you desire here
#- image: circleci/node:latest
- image: cimg/python:3.7.12-node #jiripuc/circleci-python-node:python3.9-node12-gcloud-cypress
- image: cimg/python:3.10.14-node #jiripuc/circleci-python-node:python3.9-node12-gcloud-cypress
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
Expand All @@ -29,11 +29,20 @@ jobs:
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install
#- run: yarn install

- run: yarn upgrade
#- run: yarn upgrade

- run: 'CI=false && npm run build'
- run: 'CI=false && npm cache clean -force && rm package-lock.json'

#- run: 'CI=false && npm i --save --legacy-peer-deps && npm install marked marked-man && npm audit fix && npm run build-nix'
- run: npm i --save --legacy-peer-deps

- run: npm install ajv@^8.12.0 --legacy-peer-deps

- run: npm audit fix || true

- run: 'CI=false && npm run prestart &&npm run build-nix --verbose'

- save_cache:
paths:
Expand All @@ -47,7 +56,7 @@ jobs:
echo Running test
set -e
EXIT_CODE=0
yarn test || EXIT_CODE=$?
npm test || EXIT_CODE=$?
echo $EXIT_CODE

- store_artifacts:
Expand Down
9 changes: 6 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ PORT=3010
SKIP_PREFLIGHT_CHECK=false
REACT_APP_VERSION=${FULLVERSION}
VERSION=${REACT_APP_VERSION}
REACT_APP_AUTHPROVIDERCID=${AUTHPROVIDERCID}
REACT_APP_REAPTCHA=${REAPTCHA_SITE_KEY}
REACT_APP_PCD_PATH=${PCD_PATH}
REACT_APP_AUTHPROVIDERCID=${AUTHPROVIDERCID} # value?
REACT_APP_REAPTCHA=${REAPTCHA_SITE_KEY} # value?
REACT_APP_PCD_PATH=${PCD_PATH} # value?
REACT_APP_S3_BUCKET=${S3_BUCKET} # value?
REACT_APP_S3_AK=${S3_ACCESS_KEY} # value?
REACT_APP_S3_S=${S3_SECRET} # value?
28 changes: 28 additions & 0 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint code
run: npm run lint

- name: Run tests with coverage
run: npm test
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [12.x, 14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ yarn-error.log*
# Sensitive Files
.terraformconfig/variables.tf
node_modules
src/gitInfo.json
1 change: 1 addition & 0 deletions .terraformconfig/aws_ec2_launchtemplates/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ EOF
}

# Source: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-join/
# See ./deploy.sh for standalone process
data "template_file" "kubeadm_join_hw" {
template = <<EOF
#!/bin/bash -xe
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![CircleCI](https://circleci.com/gh/HolimaX/React.svg?style=svg&circle-token=1ad83382b085ffc81cd9c161999280cfc11453a3)](https://circleci.com/gh/HolimaX/React)
![CircleCI Status](https://circleci.com/gh/HolimaX/React.svg?style=svg)
![Node CI](https://github.com/HolimaX/React/workflows/Node%20CI/badge.svg)

# Introduction
Expand Down Expand Up @@ -83,6 +83,7 @@ For compatible Products with designated type (like "Pro"/"Premium"):
- Release 1 supports OAuth 2.0 based authentication, as explained in [OAuth2](https://medium.appbase.io/how-to-implement-authentication-for-your-react-app-cf09eef3bb0b)

- Release 3 supports [ES6](https://www.w3schools.com/js/js_2016.asp) Class-based component loading via optionalDependencies and rendering check via ComponentDidMount() React Lifecycle methods with compatible SPAs.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
Expand Down
4 changes: 2 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!#/bin/bash
#!/bin/bash

echo Copying new React App version to destination location
aws s3 cp s3://<> /<>
aws s3 cp ./build s3://hx-cloud-dashboards/artifacts/ --recursive
16 changes: 16 additions & 0 deletions getGitInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { execSync } = require('child_process');
const fs = require('fs');

const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
const repoPath = execSync('git rev-parse --show-toplevel').toString().trim();
const remoteRepoPath = execSync('git remote get-url origin').toString().trim();
const shortHash = execSync('git rev-parse --verify --short HEAD').toString().trim();

const gitInfo = {
branch,
repoPath,
remoteRepoPath,
shortHash
};

fs.writeFileSync('./src/gitInfo.json', JSON.stringify(gitInfo, null, 2));
Empty file added man/beerbank.1
Empty file.
Loading
Loading