From bc13c10f1a41dfd70a497588a31698d21dfdc899 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 15 Sep 2023 14:57:42 +0200 Subject: [PATCH] Fix ci --- .env.example | 3 ++- .github/workflows/CI.yml | 2 +- assets/populate.py | 2 +- back/src/auth/auth.service.ts | 1 + front/.eslintrc.json | 1 + front/views/VerifiedView.tsx | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 4000261..38ffb5e 100644 --- a/.env.example +++ b/.env.example @@ -10,5 +10,6 @@ SCORO_URL=ws://localhost:6543 GOOGLE_CLIENT_ID=toto GOOGLE_SECRET=tata GOOGLE_CALLBACK_URL=http://localhost:19006/logged/google -SMTP_TRANSPORT=toto +SMTP_TRANSPORT=smtps://toto:tata@relay MAIL_AUTHOR='"Chromacase" ' +IGNORE_MAILS=true diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5f4ba5e..8d5433a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -93,7 +93,7 @@ jobs: run: | docker-compose ps -a docker-compose logs - wget --retry-connrefused http://localhost:3000 # /healthcheck + wget --retry-connrefused http://localhost:3000 || (docker-compose logs && exit 1) - name: Run scorometer tests run: | diff --git a/assets/populate.py b/assets/populate.py index 507f525..387c914 100755 --- a/assets/populate.py +++ b/assets/populate.py @@ -1,4 +1,4 @@ -#!/bin/env python3 +#!/usr/bin/env python3 import sys import os diff --git a/back/src/auth/auth.service.ts b/back/src/auth/auth.service.ts index 56f4679..4c2d98f 100644 --- a/back/src/auth/auth.service.ts +++ b/back/src/auth/auth.service.ts @@ -36,6 +36,7 @@ export class AuthService { } async sendVerifyMail(user: User) { + if (process.env.IGNORE_MAILS === "true") return; const token = await this.jwtService.signAsync( { userId: user.id, diff --git a/front/.eslintrc.json b/front/.eslintrc.json index 766b2a8..501a0c8 100644 --- a/front/.eslintrc.json +++ b/front/.eslintrc.json @@ -17,6 +17,7 @@ "rules": { "react/react-in-jsx-scope": "off", "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-explicit-any": "error", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-empty-function": "off", "no-restricted-imports": [ diff --git a/front/views/VerifiedView.tsx b/front/views/VerifiedView.tsx index 5e7603c..51d8c28 100644 --- a/front/views/VerifiedView.tsx +++ b/front/views/VerifiedView.tsx @@ -13,6 +13,7 @@ const VerifiedView = () => { async function run() { try { await API.fetch({ + // eslint-disable-next-line @typescript-eslint/no-explicit-any route: `/auth/verify?token=${(route.params as any).token}`, method: 'PUT', });