diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 963b8d0fb5428fc1c46fc4d0adb9935388a82dc2..05a01614ca1be0be9eac4e83571a88f7757a55c0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: node:latest +image: node:14.15.1 cache: key: ${CI_COMMIT_REF_SLUG} @@ -18,6 +18,9 @@ test: - couchdb:latest before_script: + - npm config set @concordant:registry "https://gitlab.inria.fr/api/v4/packages/npm/" + - npm config set '//gitlab.inria.fr/api/v4/packages/npm/:_authToken' "${CI_JOB_TOKEN}" + - npm install - npm ci --cache .npm --prefer-offline - curl -u "$COUCHDB_USER:$COUCHDB_PASSWORD" -X PUT $COUCHDB_URL/_users diff --git a/README.dev.md b/README.dev.md new file mode 100644 index 0000000000000000000000000000000000000000..e7ed91ef123bc7b2737bf4fc98ce24b327d98690 --- /dev/null +++ b/README.dev.md @@ -0,0 +1,71 @@ +## Build targets + +(Set up as scripts in package.json) + +- `prepare`: lifecycle script (→ build) +- `build`: should be removed (merge with prepare) +- `test`: run jest (tests & coverage) +- `start`: dev server, listens on TCP port 4000 +- `lint`: run eslint + +## Used software + +### Dev tools: + +- tsc: Typescript transpiler (to JavaScript) +- NPM: package/build manager +- babel-node: development nodeJS/Babel environment, + _not meant for production use_ +- Husky: git hooks manager +- lint-staged: apply pre-commit hooks to changed files only ; runs: + - ESlint: linter (static code analyser) + - Prettier: code formatter +- Jest: JS testing library tool +- Gitlab-CI: gitlab Continuous Integration platform + +### Libraries: + +- OpenAPI (aka Swagger): language for RESTful interface description +- Sofa: generate a REST interface from graphQL +- Apollo: graphQL library +- Express: web server +- Nano: couchDB client library + +## Files + +### Build, configuration, metadata + +- `LICENSE` +- `README.md` Doc: user +- `README.dev.md` Doc: developer +- `.git/` Config: Git +- `.gitignore` +- `package.json` Config: NPM: metadata, dependencies, scripts, + config (lint-staged, Husky) +- `package-lock.json` Actual dependency tree (automatically updated) +- `tsconfig.json` Config: tsc TypeScript compiler: + `src \ {node_modules, **/__tests__/*} → dist/` +- `.babelrc` Config: Babel compiler (??) +- `.eslintrc.js` Config: ESlint +- `.eslintignore` +- `.prettierignore` Config: Prettier +- `jest.config.js` Config: Jest (roots: src/ & test/ ; TS transformer) +- `.gitlab-ci.yml` Config: continuous integration +- `Dockerfile` Config: Docker build +- `.dockerignore` + +### Code + +- `swagger.yml` OpenAPI Specification +- `src/` Code + - `service.ts` GraphQL schema definition & resolvers + - `test/` Tests (Jest) + +### Artifacts (untracked): + +- `node_modules/` Dependencies, + created & populated by `npm install` +- `dist/` JS files, + created & populated by `npm prepare` (tsc) +- `coverage/` Tests coverage, + created & populated by `npm test` (jest)