Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/test refactoring #57

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4b3ee22
feat: adapt some stuff for SDK 51 and pipeline for 2024
VictorJorgeFGA Aug 19, 2024
a797eac
test: fix tests
VictorJorgeFGA Aug 20, 2024
1302b14
chore: adapt build action
VictorJorgeFGA Aug 20, 2024
809fc8f
chore: get the heck lint rules out of here
VictorJorgeFGA Aug 20, 2024
a09ed5b
chore: try to fix sonar scanner
VictorJorgeFGA Aug 20, 2024
a791200
chore: rollback build
VictorJorgeFGA Aug 20, 2024
6d06a6f
chore: try to add lint
VictorJorgeFGA Aug 20, 2024
dd9bfdb
chore: uses eslint instead of tslint on sonar properties
VictorJorgeFGA Aug 20, 2024
eef5515
chore: test metrics collect
VictorJorgeFGA Aug 20, 2024
a39127d
chore: add push trigger
VictorJorgeFGA Aug 20, 2024
54ca0dd
fix: parser
VictorJorgeFGA Aug 20, 2024
2033899
chore: finishes metrics config
VictorJorgeFGA Aug 20, 2024
7cd00fa
Merge pull request #1 from fga-eps-mds/chore/adapt-for-2024-1
VictorJorgeFGA Aug 20, 2024
82b22cf
chore: force metric export
VictorJorgeFGA Aug 20, 2024
71c6dbf
feat: add watermelondb
VictorJorgeFGA Aug 24, 2024
abdd2b5
feat: create database structure
VictorJorgeFGA Aug 25, 2024
a614157
feat: add User model to login phase
VictorJorgeFGA Aug 25, 2024
1d39017
test: add better-sqlite3 to aid on sql dependent tests
VictorJorgeFGA Aug 25, 2024
6028241
Merge pull request #2 from fga-eps-mds/feat/install-watermelon-db
VictorJorgeFGA Aug 25, 2024
a6ed060
feat: edit user offiline
ubrando Aug 29, 2024
17de0d9
fix: Configuração ambiente expo
GabrielSMonteiro Aug 30, 2024
c068422
updating .env files
GustaaSZ Aug 30, 2024
e33c02a
feat: editar de idoso offline
marcellaanderle Aug 31, 2024
262132e
feat: update component state with new types and default values
Natyrodrigues Aug 31, 2024
1219607
refactor: replace getIdUsuario with useEffect and add error handling
Natyrodrigues Aug 31, 2024
9a64fa0
refactor: move handleErrors function and add salvarNoBancoLocal function
Natyrodrigues Aug 31, 2024
9649dc8
refactor: move salvar
Natyrodrigues Aug 31, 2024
7e10395
refactor: replace postIdoso with salvarNoBancoLocal and switch to Toa…
Natyrodrigues Aug 31, 2024
699b532
feat: update component state with new types and default values
Natyrodrigues Aug 31, 2024
07006c2
refactor: replace getIdUsuario with useEffect and add error handling
Natyrodrigues Aug 31, 2024
d6e5f69
refactor: move handleErrors function and add salvarNoBancoLocal function
Natyrodrigues Aug 31, 2024
c763598
refactor: move salvar
Natyrodrigues Aug 31, 2024
9977458
refactor: replace postIdoso with salvarNoBancoLocal and switch to Toa…
Natyrodrigues Aug 31, 2024
49fb7ec
refactor: remove unused metricas array
Natyrodrigues Aug 31, 2024
93ca625
refactor: remove body object and related logic
Natyrodrigues Aug 31, 2024
2da047e
refactor: remove unused cadastrarMetricas function
Natyrodrigues Aug 31, 2024
8c36f24
feat: add imports for database, models, and utilities
Natyrodrigues Aug 31, 2024
178cee5
feat: implementação do schema do banco
GabrielSMonteiro Aug 31, 2024
f664374
style: fix indentation and spacing
Natyrodrigues Aug 31, 2024
e304811
feat: cadastro de idoso offline
Natyrodrigues Aug 31, 2024
882d6fe
Merge remote-tracking branch 'origin/feat/offiline-front' into feat/o…
Natyrodrigues Aug 31, 2024
1c40638
feat: listar idosos offline
sebazac332 Aug 31, 2024
9026ba3
Merge remote-tracking branch 'origin/feat/offiline-front' into feat/o…
marcellaanderle Aug 31, 2024
b27c66a
Revert "feat: listar idosos offline"
sebazac332 Aug 31, 2024
15a851b
feat: listar de idosos offline
sebazac332 Aug 31, 2024
242b569
Merge pull request #4 from fga-eps-mds/feat/offiline-front
VictorJorgeFGA Sep 2, 2024
1fe3829
test: refactoring the elderly register tests
GustaaSZ Sep 10, 2024
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
8 changes: 4 additions & 4 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EXPO_PUBLIC_API_URL=http://localhost
EXPO_PUBLIC_API_USUARIO_PORT=3001
EXPO_PUBLIC_API_FORUM_PORT=3002
EXPO_PUBLIC_API_SAUDE_PORT=3003
EXPO_PUBLIC_API_URL=http://18.231.115.8
EXPO_PUBLIC_API_USUARIO_PORT=80
EXPO_PUBLIC_API_FORUM_PORT=80
EXPO_PUBLIC_API_SAUDE_PORT=80
EXPO_PUBLIC_JWT_TOKEN_SECRET=f57d8cc37a35a8051aa97b5ec8506a2ac479e81f82aed9de975a0cb90b903044
8 changes: 4 additions & 4 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EXPO_PUBLIC_API_URL=http://3.80.226.110
EXPO_PUBLIC_API_USUARIO_PORT=3001
EXPO_PUBLIC_API_FORUM_PORT=3002
EXPO_PUBLIC_API_SAUDE_PORT=3003
EXPO_PUBLIC_API_URL=http://18.231.115.8
EXPO_PUBLIC_API_USUARIO_PORT=80
EXPO_PUBLIC_API_FORUM_PORT=80
EXPO_PUBLIC_API_SAUDE_PORT=80
EXPO_PUBLIC_JWT_TOKEN_SECRET=f57d8cc37a35a8051aa97b5ec8506a2ac479e81f82aed9de975a0cb90b903044
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ module.exports = {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"prettier/prettier": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-namespace": "off"
},
};
23 changes: 9 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,31 @@ on:
push:
branches:
- develop
- teste/sonar
- sonar/carrigindo_sonar
- teste/sonarcloud

pull_request:
types: [opened, synchronize, reopened]

jobs:
sonarcloud:
name: SonarCloud
name: Test Unit & Sonar Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install dependencies
run: yarn

- name: Linter
run: yarn eslint . --format json --output-file reports/eslint-report.json

- name: Test and coverage
run: yarn jest --coverage

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Sincroniza cobertura de testes com o Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: jest
name: 2023-2-GEROcuidado-Front
verbose: true
16 changes: 11 additions & 5 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: Export de métricas

on:
push:
branches: [main, develop]
tags:
- 'v*'
branches:
- main
- develop

pull_request:
branches:
- main
- develop
types: [closed]

jobs:
release:
Expand All @@ -17,13 +23,13 @@ jobs:
run: mkdir analytics-raw-data

- name: Coletar métricas no SonarCloud
run: python parser.py ${{ github.event.repository.name }} ${{ github.ref_name }}
run: python parser.py fga-eps-mds-1_2024-1-gerocuidado-front ${{ github.event.repository.name }} ${{ github.ref_name }}

- name: Envia métricas para repo de Doc
run: |
git config --global user.email "${{secrets.USER_EMAIL}}"
git config --global user.name "${{secrets.USER_NAME}}"
git clone --single-branch --branch main "https://x-access-token:${{secrets.API_TOKEN_DOC}}@github.com/fga-eps-mds/2023-2-GEROcuidado-Doc" docs
git clone --single-branch --branch main "https://x-access-token:${{secrets.API_TOKEN_DOC}}@github.com/fga-eps-mds/2024-1-GEROcuidado-Doc" docs
mkdir -p docs/analytics-raw-data
cp -R analytics-raw-data/*.json docs/analytics-raw-data
cd docs/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/udpate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: update
on: pull_request
on: pull_request

jobs:
update:
Expand Down
10 changes: 5 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"package": "com.gerocuidado.gerocuidado"
},
"web": {
"favicon": "./assets/favicon.png",
Expand All @@ -39,15 +40,14 @@
"origin": false
},
"eas": {
"projectId": "7028a81c-adee-41de-91a7-b7e80535a448"
"projectId": "7b777975-c65a-4ae3-ab23-93691fd81c12"
}
},
"runtimeVersion": {
"policy": "appVersion"
},
"updates": {
"url": "https://u.expo.dev/7028a81c-adee-41de-91a7-b7e80535a448"
},
"owner": "gerocuidado"
}
}
}
}
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
plugins: ["expo-router/babel"],
plugins: [["@babel/plugin-proposal-decorators", { "legacy": true }]],
};
};
19 changes: 11 additions & 8 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@
"version": ">= 5.5.0"
},
"build": {
"development": {
"android": {
"buildType": "apk",
"developmentClient": true
}
},
"preview": {
"android": {
"buildType": "apk"
}
},
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview2": {
"distribution": "internal"
},
"production": {}
"production": {
"android": {
"buildType": "app-bundle"
}
}
},
"submit": {
"production": {}
Expand Down
9 changes: 9 additions & 0 deletions jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ module.exports = {
jest.mock("@react-native-async-storage/async-storage", () =>
require("@react-native-async-storage/async-storage/jest/async-storage-mock"),
);

jest.mock(
'@nozbe/watermelondb/adapters/sqlite/makeDispatcher/index.native.js',
() => {
return jest.requireActual(
'@nozbe/watermelondb/adapters/sqlite/makeDispatcher/index.js',
);
},
);
Loading
Loading