2022-08-11 23:51:17 +03:00
|
|
|
name: coverage
|
|
|
|
|
|
|
|
on:
|
2022-09-28 14:16:46 +03:00
|
|
|
schedule:
|
|
|
|
- cron: "0 8 * * *"
|
2022-08-11 23:51:17 +03:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
RUSTFLAGS: "-C instrument-coverage"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
coverage:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust: [stable]
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Environment
|
|
|
|
run: bin/environment.sh
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Install Prerequisites
|
|
|
|
run: bin/install_prerequisites_ubuntu.sh
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Install Rust
|
|
|
|
run: bin/install_rust_latest.sh
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Install Grcov
|
|
|
|
run: bin/install_grcov.sh
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Build
|
|
|
|
run: cargo build
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Test Prerequisites
|
|
|
|
run: bin/test/test_prerequisites.sh
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Run Integration Tests
|
2022-09-30 11:53:41 +03:00
|
|
|
run: |
|
|
|
|
export LLVM_PROFILE_FILE="hurl-test-integration-%p-%m.profraw"
|
|
|
|
export PATH="$PWD/target/debug:$PATH"
|
|
|
|
bin/test/test_integ.sh
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Build Report
|
|
|
|
run: |
|
|
|
|
grcov . --binary-path target/debug -s . -t html --branch --ignore-not-existing -o ./coverage/
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Deploy Github Pages
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
2022-11-14 18:24:52 +03:00
|
|
|
github_token: ${{ secrets.HURL_BOT_TOKEN }}
|
2022-08-11 23:51:17 +03:00
|
|
|
publish_branch: github-pages
|
|
|
|
publish_dir: coverage
|
|
|
|
destination_dir: coverage
|
2022-11-03 18:10:38 +03:00
|
|
|
|
2022-08-11 23:51:17 +03:00
|
|
|
- name: Archive Artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: coverage
|
|
|
|
path: |
|
|
|
|
coverage
|
|
|
|
*.profraw
|
2022-11-03 18:10:38 +03:00
|
|
|
|