generated from EyeSeeTea/dhis2-app-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize kata/declarative-programming-xurxodev
- Loading branch information
0 parents
commit c814410
Showing
116 changed files
with
17,677 additions
and
0 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,5 @@ | ||
> 0.5% | ||
last 2 versions | ||
Firefox ESR | ||
ie 11 | ||
not dead |
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,6 @@ | ||
BROWSER=false | ||
VITE_PORT=8081 | ||
|
||
VITE_DHIS2_BASE_URL=https://dev.eyeseetea.com/play | ||
VITE_DHIS2_AUTH='admin:district' | ||
#VITE_DHIS2_AUTH='nonadmin:Dojo_2023' |
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 @@ | ||
GENERATE_SOURCEMAP=false |
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,2 @@ | ||
/**/*.d.ts | ||
/src/locales |
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,73 @@ | ||
{ | ||
"extends": [ | ||
"react-app", | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:testing-library/react" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"ignorePatterns": ["src/**/snapshots/*.ts"], | ||
"rules": { | ||
"no-console": ["warn", { "allow": ["debug", "warn", "error"] }], | ||
"prefer-const": "warn", | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/explicit-function-return-type": ["off"], | ||
"@typescript-eslint/no-this-alias": ["off"], | ||
"@typescript-eslint/no-unnecessary-type-constraint": ["off"], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"caughtErrorsIgnorePattern": "^_" | ||
} | ||
], | ||
"@typescript-eslint/no-unused-expressions": ["warn"], | ||
"react/prop-types": "off", | ||
"react/display-name": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"no-unused-expressions": "off", | ||
"no-useless-concat": "off", | ||
"no-useless-constructor": "off", | ||
"no-unexpected-multiline": "off", | ||
"default-case": "off", | ||
"array-callback-return": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/ban-ts-ignore": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/indent": "off", | ||
"@typescript-eslint/member-delimiter-style": "off", | ||
"@typescript-eslint/type-annotation-spacing": "off", | ||
"@typescript-eslint/no-misused-promises": "warn", | ||
"no-use-before-define": "off", | ||
"no-debugger": "warn", | ||
"no-extra-semi": "off", | ||
"no-mixed-spaces-and-tabs": "off", | ||
"no-useless-rename": "off", | ||
"react-hooks/rules-of-hooks": "warn", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"testing-library/await-async-query": "error", | ||
"testing-library/no-await-sync-query": "error", | ||
"testing-library/prefer-screen-queries": "off", | ||
"testing-library/no-debugging-utils": "off", | ||
"testing-library/no-dom-import": "off" | ||
}, | ||
"plugins": ["@typescript-eslint", "react-hooks", "unused-imports"], | ||
"env": {}, | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"settings": { | ||
"react": { | ||
"pragma": "React", | ||
"version": "16.6.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
function changed { | ||
git diff --name-only HEAD@{1} HEAD | grep "^$1" > /dev/null 2>&1 | ||
} | ||
|
||
if changed 'yarn.lock'; then | ||
echo "Lockfile changes detected. Installing updates..." | ||
yarn install | ||
fi |
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,9 @@ | ||
### :pushpin: References | ||
|
||
- **Issue:** Closes #? | ||
|
||
### :memo: Implementation | ||
|
||
### :video_camera: Screenshots/Screen capture | ||
|
||
### :fire: Notes to the tester |
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,47 @@ | ||
name: Application testing | ||
on: | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
unit-tests: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install apt libraries | ||
run: sudo apt install gettext -y | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache yarn dependencies | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile --silent | ||
|
||
- name: Install translations | ||
run: yarn localize | ||
|
||
- name: Run jest tests | ||
run: yarn test | ||
|
||
- name: Build typescript | ||
run: npx tsc |
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,42 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
manifest.webapp | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
*.sublime-project | ||
*.sublime-workspace | ||
*.code-workspace | ||
*.zip | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
src/locales/ | ||
src/react-app.d.ts | ||
src/react-app-env.d.ts | ||
bak | ||
.eslintcache | ||
|
||
# cypress | ||
cypress/screenshots/ | ||
cypress/videos/ | ||
cypress/fixtures/ | ||
|
||
# IntelliJ | ||
.idea/* | ||
|
||
docs/ |
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
./.githooks/dep-check |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn prettify && yarn lint && yarn update-po && yarn test |
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 @@ | ||
v18.14.2 |
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,4 @@ | ||
build | ||
node_modules | ||
*.min.js | ||
*.min.css |
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 @@ | ||
/** @format */ | ||
|
||
module.exports = { | ||
printWidth: 100, | ||
tabWidth: 4, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: false, | ||
trailingComma: "es5", | ||
bracketSpacing: true, | ||
jsxBracketSameLine: false, | ||
arrowParens: "avoid", | ||
rangeStart: 0, | ||
rangeEnd: Infinity, | ||
proseWrap: "preserve", | ||
requirePragma: false, | ||
insertPragma: false, | ||
}; |
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,41 @@ | ||
language: node_js | ||
node_js: | ||
- 12.13.0 | ||
dist: bionic | ||
cache: | ||
directories: | ||
- "$HOME/.cache" | ||
before_install: | ||
- echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
# Install python dependencies | ||
- sudo apt-get update | ||
- sudo apt-get install python3 python python3-setuptools docker.io docker-compose | ||
# Install d2-docker | ||
- git clone https://github.com/EyeSeeTea/d2-docker.git | ||
- cd d2-docker/ | ||
- sudo python3 setup.py install | ||
- d2-docker --help | ||
# Hack to not be prompted in the terminal | ||
- sudo apt-get remove golang-docker-credential-helpers | ||
# Start docker service | ||
- sudo systemctl unmask docker.service | ||
- sudo systemctl unmask docker.socket | ||
- sudo systemctl start docker.service | ||
# Login to docker | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
# Start docker service | ||
- d2-docker start eyeseetea/dhis2-data:2.30-sierra-leone -d --port 8080 | ||
install: | ||
- yarn install --frozen-lockfile | ||
- yarn cy:verify | ||
- yarn build | ||
script: | ||
- PORT=8081 REACT_APP_DHIS2_BASE_URL=http://localhost:8080 REACT_APP_CYPRESS=true yarn start & | ||
- yarn wait-on http-get://localhost:8081 | ||
- yarn wait-on http-get://localhost:8080 | ||
- CYPRESS_EXTERNAL_API=http://localhost:8080 CYPRESS_ROOT_URL=http://localhost:8081 yarn cy:e2e:run --record --key $CYPRESS_KEY | ||
- kill $(jobs -p) || true | ||
addons: | ||
apt: | ||
packages: | ||
- libgconf-2-4 |
Oops, something went wrong.