Skip to content

Commit

Permalink
add unit report
Browse files Browse the repository at this point in the history
  • Loading branch information
Bender101 committed Nov 30, 2023
1 parent 40e4c35 commit c717e18
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 15 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/main-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
name: linting, testing, building
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
permissions:
contents: write
pages: write
Expand All @@ -57,7 +57,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
strategy:
matrix:
node-version: [ 17.x ]
node-version: [17.x]
steps:
- uses: actions/checkout@v2
- name: Staring Node.js ${{ matrix.node-version }}
Expand All @@ -72,20 +72,26 @@ jobs:
- name: build storybook
run: npm run storybook:build
if: always()
# - name: screenshot testing
# run: npm run test:ui:ci
# if: always()
# - name: Generate HTML report
# run: npm run test:ui:report
# if: always()
# - 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 @@ -95,7 +101,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 17.x ]
node-version: [17.x]
steps:
- uses: actions/checkout@v2
- name: Staring Node.js ${{ matrix.node-version }}
Expand All @@ -109,6 +115,3 @@ 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 @@ -4,4 +4,4 @@ node_modules
storybook-static
.loki/report.json
.loki/report.html
/reports
/reports/unit
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 c717e18

Please sign in to comment.