Skip to content

Commit a3523e0

Browse files
fix(backend-ci): Add type ignore for backend database and add --coverage for frontend test
1 parent d388095 commit a3523e0

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

.github/workflows/ci-frontend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'CI - Dashboard Frontend'
1+
name: 'CI - Frontend'
22
on:
33
workflow_dispatch:
44
push:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ htmlcov/
142142
.tox/
143143
.coverage
144144
.coverage.*
145-
coverage/
145+
**/coverage/**
146146
nosetests.xml
147147
cpverage.html
148148
coverage.xml
@@ -151,6 +151,7 @@ cov.html
151151
*.cover
152152
.hypothesis/
153153

154+
154155
# Virtual Environment & packages
155156
.python-version
156157
.venv

backend/src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
def initialize_backend_application() -> fastapi.FastAPI:
11-
app = fastapi.FastAPI(**settings.set_backend_app_attributes)
11+
app = fastapi.FastAPI(**settings.set_backend_app_attributes) # type: ignore
1212

1313
app.add_middleware(
1414
CORSMiddleware,

backend/src/repository/table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class DBTable(DeclarativeBase):
8-
metadata: sqlalchemy.MetaData = sqlalchemy.MetaData()
8+
metadata: SQLAlchemyMapped[sqlalchemy.MetaData] = sqlalchemy.MetaData() # type: ignore
99

1010

1111
Base: typing.Type[DeclarativeBase] = DBTable

frontend/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ module.exports = {
66
collectCoverage: true,
77
coverageDirectory: "./coverage",
88
passWithNoTests: true,
9+
setupFilesAfterEnv: ["<rootDir>/src/setupTests.js"],
910
};

frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"fmt:check": "prettier --check './src/**/*.{tsx,ts}' --config ./.prettierrc.json",
2323
"fmt:fix": "prettier --write './src/**/*.{tsx,ts}' --config ./.prettierrc.json",
2424
"start": "react-scripts start",
25-
"test:notestpass": "react-scripts test --passWithNoTests",
26-
"test": "react-scripts test",
25+
"test:notestpass": "react-scripts test --passWithNoTests --coverage",
26+
"test": "react-scripts test --coverage",
2727
"eject": "react-scripts eject"
2828
},
2929
"eslintConfig": {

0 commit comments

Comments
 (0)