Skip to content

Commit

Permalink
feat: add unit tests and loki for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
TomatoVan committed Mar 27, 2024
1 parent a41916d commit 3d588b6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,23 @@ jobs:
- name: screenshot testing
run: npm run test:ui:ci
if: always()
- name: unit testing
if: always()
run: npm run test:unit
- name: Generate HTML report
run: npm run test:ui:report
if: always()
- name: move loki
run: mv .loki reports/
if: always()
- name: Setup Pages
uses: actions/configure-pages@v2
if: always()
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
if: always()
with:
path: '.loki'
path: 'reports'
- name: Deploy to GitHub Pages
id: deployment
if: always()
Expand All @@ -111,7 +117,5 @@ jobs:
if: always()
- name: linting css
run: npm run lint:scss
- name: unit testing
if: always()
run: npm run test:unit


2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ node_modules
#/.package-lock.json
/storybook-static/project.json
/storybook-static/favicon.ico
/reports
/reports/unit
/reports/unit/report.html


Expand Down
15 changes: 15 additions & 0 deletions reports/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Отчеты</title>
</head>
<body>
<a href="./unit/report.html">UNIT REPORT</a>
<hr>
<a href=".loki/report.html">SCREENSHOT REPORT</a>
</body>
</html>

0 comments on commit 3d588b6

Please sign in to comment.