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

Update main.yaml #935

Open
wants to merge 25 commits into
base: feature/825/update-dependencies
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
21 changes: 0 additions & 21 deletions .eslintrc.json

This file was deleted.

35 changes: 21 additions & 14 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
Test_DEV:
runs-on: ubuntu-latest
steps:

- name: 'Checkout the Repo'
uses: actions/checkout@v3

Expand All @@ -25,23 +24,24 @@ jobs:
mongodb-username: ${{secrets.MONGODB_USER}}
mongodb-password: ${{secrets.MONGODB_PASS}}
mongodb-db: ${{secrets.MONGODB_DB}}

- name: 'Wait for the database to start'
run: |
wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for |
sh -s -- localhost:27017 -- echo "Database is up"
env:
WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3

- name: 'Install Node.js v.14'
- name: 'Install Node.js v.20.15.1'
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 20.15.1
cache: 'npm'

- name : 'Install dependencies'
- name: 'Install dependencies'
run: npm install
- name : 'Run Tests'

- name: 'Run Tests'
run: npm run test
env:
NODE_OPTIONS: --max_old_space_size=4096
Expand All @@ -67,24 +67,31 @@ jobs:
GMAIL_REFRESH_TOKEN: ${{secrets.GMAIL_REFRESH_TOKEN}}
GMAIL_REDIRECT_URI: ${{secrets.GMAIL_REDIRECT_URI}}
COOKIE_DOMAIN: ${{secrets.COOKIE_DOMAIN}}
# Sonar
# Sonar
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
if: success() || failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Test_Docker:
runs-on: ubuntu-latest
steps:

#Checkout Repository
- uses: actions/checkout@v3

# Docker Build
- uses: docker/build-push-action@v3
- name: Checkout
uses: actions/checkout@v3

# Setting up Docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Docker Build
- name: Build
uses: docker/build-push-action@v6
with:
push: false
file: ./Dockerfile
tags: back-stage:test
cache-from: type=gha
cache-to: type=gha, mode=max
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run pre-commit
2 changes: 0 additions & 2 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run test
45 changes: 45 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import globals from 'globals'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})

export default [...compat.extends('eslint:recommended', 'prettier'), {
languageOptions: {
globals: {
...globals.node,
...globals.module,
...globals.jest,
},

ecmaVersion: 2021,
sourceType: 'module',
},

rules: {
indent: ['error', 2],
'linebreak-style': ['error', 'windows'],
quotes: ['error', 'single'],
semi: ['error', 'never'],
'eol-last': ['error', 'always'],

'no-multiple-empty-lines': ['error', {
max: 2,
maxEOF: 1,
maxBOF: 0,
}],

'no-unused-vars': ['error', {
vars: 'all',
argsIgnorePattern: '^_',
}],
},
}]
4 changes: 3 additions & 1 deletion jest.config.js → jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ module.exports = {
'!<rootDir>/docs/*',
'!<rootDir>/src/emails/*',
'!<rootDir>/*.json',
'!<rootDir>/*.yaml'
'!<rootDir>/*.yaml',
'!<rootDir>/*.mjs',
'!<rootDir>/*.cjs',
],
coverageThreshold: {
global: {
Expand Down
Loading
Loading