Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libpq-dev
- name: Format
run: cargo fmt --all -- --check
- name: Lint
Expand All @@ -23,11 +21,22 @@ jobs:
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Run coverage
run: cargo tarpaulin --out Xml
- name: Upload coverage
if: env.CS_ACCESS_TOKEN != ''
uses: codecov/codecov-action@v3
with:
files: cobertura.xml
token: ${{ env.CS_ACCESS_TOKEN }}
run: cargo tarpaulin --out lcov
- name: Install CodeScene coverage tool
if: secrets.CS_ACCESS_TOKEN
env:
CODESCENE_CLI_SHA256: ${{ secrets.CODESCENE_CLI_SHA256 }}
run: |
set -euo pipefail
curl -fsSL -o install-cs-coverage-tool.sh https://downloads.codescene.io/enterprise/cli/install-cs-coverage-tool.sh
if [ -n "${CODESCENE_CLI_SHA256:-}" ]; then
echo "${CODESCENE_CLI_SHA256} install-cs-coverage-tool.sh" | sha256sum -c -
fi
bash install-cs-coverage-tool.sh -y
rm install-cs-coverage-tool.sh
- name: Upload coverage data to CodeScene
if: secrets.CS_ACCESS_TOKEN
env:
CS_ACCESS_TOKEN: ${{ secrets.CS_ACCESS_TOKEN }}
run: cs-coverage upload --format "lcov" --metric "line-coverage" "lcov.info"

25 changes: 0 additions & 25 deletions .github/workflows/coverage.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/get-codescene-sha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Get CodeScene CLI SHA256

on:
workflow_dispatch:

jobs:
fetch-sha:
runs-on: ubuntu-latest
steps:
- name: Compute SHA256 of install script
run: |
set -euo pipefail
url="https://downloads.codescene.io/enterprise/cli/install-cs-coverage-tool.sh"
curl -fsSL "$url" -o install-cs-coverage-tool.sh
hash=$(sha256sum install-cs-coverage-tool.sh | awk '{print $1}')
echo "CODESCENE_CLI_SHA256=$hash"
rm install-cs-coverage-tool.sh