Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverage CI #194

Merged
merged 14 commits into from Oct 5, 2020
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 15 additions & 21 deletions .github/workflows/coverage.yml
Expand Up @@ -18,12 +18,14 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"

steps:
- name: Build Gwion
uses: fennecdjay/gwion-action@v1
with:
dir: .
ref: ${{ github.sha }}
run: 'true'
- name: Checkout
Copy link
Member

@fennecdjay fennecdjay Oct 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the thing asked for in the issue, you uncovered so many things beyond that!
Thank you.

uses: actions/checkout@v2

- name: Init submodules
run: git submodule update --init util ast
Comment on lines +24 to +25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submodules on their own place is nice.


- name: Build & Test Gwion
run: make && make test
TotallyNotChase marked this conversation as resolved.
Show resolved Hide resolved
env:
USE_COVERAGE: 1

Expand Down Expand Up @@ -51,7 +53,13 @@ jobs:
COV_NUM=${COV_TXT: : -1}
echo $COV_NUM > gwion-coverage-report/coverage_num.txt
sed -i 's/<html>/<script type="text\/javascript" src="..\/focus.js"><\/script><html>/' index.src_*.html
branch=$(basename ${{ github.event.ref }})
if [ "${{ github.event_name }}" == "push" ]
then
ref="${{ github.ref }}"
else
ref="${{ github.event.head.ref }}"
fi
branch=$(basename ref)
Comment on lines +59 to +65
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty useful snippet here.

cd gwion-coverage-report/
bash old.sh $branch
bash summary.sh
Expand Down Expand Up @@ -95,17 +103,3 @@ jobs:
# git add -f html
# git commit -m "Update html report"
# git subtree push --prefix html origin gh-pages


- name: Send mail
uses: dawidd6/action-send-mail@master
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: Github Actions job result
body: file://diff.html
to: ${{ github.event.repository.owner.email }},${{ github.event.pusher.email }}
from: Gwion Coverage action
content_type: text/html
TotallyNotChase marked this conversation as resolved.
Show resolved Hide resolved