Skip to content

Commit

Permalink
Merge branch 'develop' into setup-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaspalma committed Oct 9, 2024
2 parents 1a0dbb9 + 8a15ab2 commit 89944e3
Show file tree
Hide file tree
Showing 76 changed files with 5,431 additions and 1,484 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ VITE_APP_PLAUSIBLE_HOST=
VITE_APP_SEMESTER=
VITE_APP_SITE_TITLE=
VITE_APP_BACKEND_URL=

# To upload source maps to Sentry (Optional)
SENTRY_AUTH_TOKEN=
58 changes: 44 additions & 14 deletions .github/workflows/codeanalysis.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,55 @@
name: Code analysis

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
types: [ready_for_review, synchronize, opened, reopened]

jobs:
vitest:
runs-on: ubuntu-latest
name: Vitest and RTL tests

strategy:
matrix:
node-version: [21.x]

steps:
lint:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
name: Lint

strategy:
matrix:
node-version: [21.x]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install

- name: Build site
run: npm run build

- name: Lint Code
run: npm run lint

vitest:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
name: Vitest and RTL tests

strategy:
matrix:
node-version: [21.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

Expand All @@ -38,4 +68,4 @@ jobs:

- name: Run tests
run: CI=true npm run test-coverage

2 changes: 2 additions & 0 deletions .github/workflows/niployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name }}

steps:
- name: Upload to NIployments register
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<h3 align="center"> TimeTableScheduler - Frontend </h3>
<h3 align="center"> Time Table Selector - Frontend </h3>
<p align="center"> A platform where students can experiment with the possible combination of schedule options they can pick at the start of the semester </p>
<p align="center">
<a href="https://reactjs.org/">
Expand Down
40 changes: 40 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";

export default [
{
files: ["src/*.{js,mjs,cjs,ts,jsx,tsx}"],
},
{
languageOptions:
{
globals: { ...globals.browser, ...globals.node }
},
},
{
settings: {
react: {
version: '18.2',
},
},
},
{
ignores: ["src/components/ui/*", "src/components/svgs/*", "build/"],
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
rules: {
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-require-imports': 'off',
'no-console': ['error', { allow: ["error", "warn", "debug"] }]
}
},
];
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#b33636" />
<meta name="description" content="NIAEFEUP | TimeTableScheduler" />
<meta name="description" content="NIAEFEUP | Time Table Selector" />
<link rel="apple-touch-icon" href="/logo192.png" />

<!-- Fonts -->
Expand All @@ -21,7 +21,7 @@
/>

<link rel="manifest" href="/manifest.json" />
<title>NIAEFEUP | TimeTableScheduler</title>
<title>NIAEFEUP | Time Table Selector</title>
</head>

<body>
Expand Down
Loading

0 comments on commit 89944e3

Please sign in to comment.