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

feat: add talking questionnaires synchro #246

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0682480
feat: get externalResources during synchronization
QRuhier Oct 10, 2024
058c7b7
chore: add comments & remove unused imports/exports
QRuhier Oct 10, 2024
8a7eda1
fix: get external resources only for needed questionnaires
QRuhier Oct 10, 2024
c1b4c7a
feat: delete external resources for not needed questionnaires
QRuhier Oct 11, 2024
a53bb5e
feat: delete external resources root-cache if no external questionnai…
QRuhier Oct 11, 2024
944dbe7
feat: handle progress bar for external resources synchro
QRuhier Oct 11, 2024
baaf348
fix: handle promises for external resources
QRuhier Oct 11, 2024
db959e1
perf: optimize cache lookup during external resources synchronization
QRuhier Oct 11, 2024
4b2a111
feat : handle errors on fetching external url
QRuhier Oct 14, 2024
02e9aa3
chore: remove unused functions & imports
QRuhier Oct 14, 2024
2a0e2ea
feat: delete old external resources caches
QRuhier Oct 14, 2024
98c59b8
docs: add external resources synchronization
QRuhier Oct 15, 2024
8a3256a
refactor: simplify externalResources functions
QRuhier Oct 15, 2024
b5d374e
test: set vitest
QRuhier Oct 15, 2024
0eba0a6
test: add tests for external resources synchro
QRuhier Oct 16, 2024
7c1b55c
fix: import const
QRuhier Oct 16, 2024
d045171
ci: add test in jobs
QRuhier Oct 16, 2024
eacd591
ci: remove condition on target branch for pull_request
QRuhier Oct 16, 2024
69397b9
ci: fix test job
QRuhier Oct 16, 2024
f66c946
test : fix sonar config
QRuhier Oct 17, 2024
8785b88
docs : update external resources synchro
QRuhier Oct 18, 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
7 changes: 4 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@ on:
push:
branches: ["main", "2.*"]
pull_request:
branches: ["main", "2.*"]

jobs:
build:
test_and_build:
name: Test & Build
runs-on: ubuntu-latest
if: github.event.head_commit.author.name != 'github-actions[bot]'
environment: demo
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: yarn
- run: yarn test
- run: yarn build
- uses: actions/upload-artifact@v4
with:
name: drama
path: drama-queen/dist

check_if_version_upgraded:
needs: build
needs: test_and_build
runs-on: ubuntu-latest
if: |
github.event_name == 'push' ||
Expand Down
8 changes: 7 additions & 1 deletion drama-queen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite --port 5001 --strictPort",
"test": "vitest run",
"build": "tsc && vite build",
"postbuild": "node build/remote-env.cjs remoteEntry.js",
"preview": "vite preview --port 5001 --strictPort",
Expand Down Expand Up @@ -37,16 +38,21 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@types/node": "^20.16.10",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.3.2",
"jsdom": "^25.0.1",
"prettier": "^3.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"vite": "^5.4.8",
"vite-envs": "^4.4.5",
"vite-plugin-pwa": "^0.19.8",
"vite-tsconfig-paths": "^4.3.2"
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^2.1.3"
}
}
20 changes: 20 additions & 0 deletions drama-queen/src/core/model/ExternalResources.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export type ExternalQuestionnaire = {
id: string
cacheName: string
}

export type ExternalQuestionnaires = ExternalQuestionnaire[]

export type ExternalQuestionnairesWrapper = {
questionnaires: ExternalQuestionnaires
version?: string
}

export type ExternalQuestionnairesFiltered = {
neededQuestionnaires: ExternalQuestionnaires
notNeededQuestionnaires: ExternalQuestionnaires
}

export type Manifest = {
[key: string]: string
}
3 changes: 2 additions & 1 deletion drama-queen/src/core/model/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export * from './Campaign'
export * from './ExternalResources'
export * from './IdAndQuestionnaireId'
export * from './Nomenclature'
export * from './Paradata'
export * from './Questionnaire'
export * from './SurveyUnit'
export * from './SurveyUnitData'
export * from './IdAndQuestionnaireId'
Loading
Loading