diff --git a/.github/workflows/wip-deploy-ci-app.yml b/.github/workflows/wip-deploy-ci-app.yml index a114df4692..7fe16f861d 100644 --- a/.github/workflows/wip-deploy-ci-app.yml +++ b/.github/workflows/wip-deploy-ci-app.yml @@ -10,54 +10,48 @@ on: - 3577-app jobs: - # test: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - - # - name: Use Node.js - # uses: actions/setup-node@v4 - # with: - # node-version: "18.20" - - # - uses: actions/cache@v4 - # id: cache-npm - # with: - # path: | - # node_modules - # app/node_modules - # packages/ds/node_modules - # packages/lib/node_modules - # key: ${{ runner.os }}-nodemodules-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-nodemodules- + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - # - name: Install packages - # if: steps.cache-npm.outputs.cache-hit != 'true' - # run: npm ci + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: "18.20" - # - name: Build lib - # working-directory: packages/lib - # run: npm run build + - uses: actions/cache@v4 + id: cache-npm + with: + path: | + node_modules + app/node_modules + packages/ds/node_modules + packages/lib/node_modules + key: ${{ runner.os }}-nodemodules-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-nodemodules- - # - name: Build ds - # working-directory: packages/ds - # run: npm run build + - name: Install packages + if: steps.cache-npm.outputs.cache-hit != 'true' + run: npm ci - # # Typescript check - # - name: Check types - # working-directory: app - # continue-on-error: false - # run: npm run check-types + # Typescript check + - name: Check types + env: + APP_NAME: app + continue-on-error: false + run: npm run check-types - # # ESLint check - # - name: Lint code - # working-directory: app - # continue-on-error: false - # run: npm run lint + # ESLint check + - name: Lint code + env: + APP_NAME: app + continue-on-error: false + run: npm run lint build: - # needs: [test] + needs: [test] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/admin/Dockerfile b/admin/Dockerfile index 41999a1291..b911a7e49d 100644 --- a/admin/Dockerfile +++ b/admin/Dockerfile @@ -43,8 +43,6 @@ ARG VITE_SENTRY_SESSION_SAMPLE_RATE ARG VITE_SENTRY_TRACING_SAMPLE_RATE ARG VITE_SENTRY_ON_ERROR_SAMPLE_RATE -RUN cd packages/lib && npm run build -RUN cd packages/ds && npm run build RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \ SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) \ npm run build -- -- --mode ${VITE_ENVIRONMENT} diff --git a/app/Dockerfile b/app/Dockerfile index aad0d5073b..b8b817c3b6 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -46,8 +46,6 @@ ARG VITE_FRANCE_CONNECT_URL ARG VITE_API_ENGAGEMENT_URL ARG VITE_API_ENGAGEMENT_SNU_ID -RUN cd packages/lib && npm run build -RUN cd packages/ds && npm run build RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \ SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) \ npm run build -- -- --mode ${VITE_ENVIRONMENT}