Adds github webhook integration #105
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux x86_64 | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build_test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup rust stable | |
run: curl https://sh.rustup.rs -sSf | sh -s -- -y | |
- name: unit tests | |
run: | | |
cargo test --all --release | |
- name: upload bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-x86_64-ubuntu-20.04 | |
path: target/release/busser | |
build_test_with_coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup rust stable | |
run: curl https://sh.rustup.rs -sSf | sh -s -- -y && cargo install cargo-tarpaulin | |
- name: unit tests | |
run: | | |
cargo build --release && cargo tarpaulin --out json --exclude-files tests/** | |
- name: upload bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-x86_64-lastest | |
path: target/release/busser | |
- name: upload coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: tarpaulin-report.json | |
- name: Generate summary | |
id: summary | |
run: | | |
{ | |
echo 'SUMMARY<<EOF' | |
python3 .github/workflows/report.py -r github/JerboaBurrow/Busser -m main --human | |
echo EOF | |
} >> "$GITHUB_ENV" | |
- name: Notify coverage | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.BURROW_BOT }} | |
script: | | |
const { SUMMARY } = process.env | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `${SUMMARY}` | |
}) |