Skip to content

Commit

Permalink
Merge pull request #9 from doziestar/feat/auth-test
Browse files Browse the repository at this point in the history
refactor: Update coverage report generation and deployment
  • Loading branch information
doziestar committed Jul 6, 2024
2 parents c0c94ce + a6329f3 commit 999c1d6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ jobs:
with:
name: coverage
path: coverage.txt
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}

build:
runs-on: ubuntu-latest
Expand All @@ -119,20 +123,30 @@ jobs:
uses: actions/download-artifact@v2
with:
name: coverage
- name: Generate coverage HTML
- name: Generate coverage HTML and index
run: |
go tool cover -html=coverage.txt -o coverage.html
go tool cover -html=merged-coverage.txt -o coverage.html
echo '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0;url=coverage.html">
<script type="text/javascript">
window.location.href = "coverage.html"
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow this <a href="coverage.html">link to the coverage report</a>.
</body>
</html>' > index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.TOKEN }}
publish_dir: .
publish_branch: gh-pages
keep_files: true
keep_files: false
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: "Deploy coverage report to GitHub Pages"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

DataVinci is a comprehensive data management and visualization tool designed for the developer community. It enables users to visualize data from various sources, generate insights, analyze data with AI models, and receive real-time updates on anomalies.

[![codecov](https://codecov.io/github/doziestar/datavinci/graph/badge.svg?token=PN33XKZTE5)](https://codecov.io/github/doziestar/datavinci)

## Table of Contents

- [Features](#features)
Expand Down

0 comments on commit 999c1d6

Please sign in to comment.