diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43d696fe4df24878869152fd90aa13f718e79670..9f2bc57a15cfd093a1ca8fddeff8c8c60f945c95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,14 +1,17 @@ -image: node:18.15.0 +image: node:18 + stages: - test + # === Caches === .yarn-cache: &yarn-cache key: yarn-$CI_JOB_IMAGE paths: - .yarn + # === Proxy === # Description: sets up the proxy needed for the runner inside of the PTB. Produces a build.env that is used in the next jobs proxy: @@ -39,9 +42,10 @@ proxy: # install deps - yarn install --immutable + # === Job: Unit Tests === # Description: this job runs the unit tests -test: +unit_tests: stage: test needs: ["proxy"] script: @@ -54,3 +58,16 @@ test: reports: junit: - junit.xml + + +# === Job: ESLint and Prettier === +# Description: this job runs ESLint and Prettier +lint: + stage: test + needs: ["proxy"] + script: + - *yarn-install + - yarn run test:lint + - yarn run test:prettier + cache: + - <<: *yarn-cache