Skip to content

Commit

Permalink
doc coverage ci
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasdewally committed Nov 1, 2023
1 parent cda4b58 commit 59fb9fb
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 33 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/doc-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: 'Info: Documentation Coverage'
on:
push:
pull_request:
workflow_dispatch:


jobs:
minion:
name: 'Minion'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: doccoverage-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# match minion exactly, cargo inexactly
restore-keys: doccoverage-${{ runner.os }}-cargo

- working-directory: ./solvers/minion
run: rustup update nightly && rustup default nightly

- name: Coverage Report
working-directory: ./solvers/minion
run: |
echo -e "# Coverage Report \n\n" > $GITHUB_STEP_SUMMARY
RUSTDOCFLAGS='-Z unstable-options --show-coverage' cargo doc >> $GITHUB_STEP_SUMMARY
chuffed:
name: 'Chuffed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: doccoverage-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# match minion exactly, cargo inexactly
restore-keys: doccoverage-${{ runner.os }}-cargo

- working-directory: ./solvers/chuffed
run: rustup update nightly && rustup default nightly

- name: Coverage Report
working-directory: ./solvers/chuffed
run: |
echo '```' >> $GITHUB_STEP_SUMMARY
RUSTDOCFLAGS='-Z unstable-options --show-coverage' cargo doc >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
conjure-oxide:
name: 'Conjure Oxide'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: doccoverage-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# match minion exactly, cargo inexactly
restore-keys: doccoverage-${{ runner.os }}-cargo

- run: rustup update nightly && rustup default nightly

- name: Coverage Report
run: |
echo '```' >> $GITHUB_STEP_SUMMARY
RUSTDOCFLAGS='-Z unstable-options --show-coverage' cargo doc >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
33 changes: 0 additions & 33 deletions .github/workflows/minion-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,39 +113,6 @@ jobs:
- working-directory: ./solvers/minion
run: cargo test -- --test-threads=1

doc-coverage:
name: 'solvers/minion: Documentation Coverage Report'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get minion hash for cache invalidation
id: minion-cache
run: |
echo "minion_sha=$(git rev-parse HEAD:solvers/minion/vendor)" >> "$GITHUB_OUTPUT"
- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
solvers/minion/vendor
key: ${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# match minion exactly, cargo inexactly
restore-keys: ${{ runner.os }}-minion-${{ steps.minion-cache.outputs.minion_sha}}-cargo-

- working-directory: ./solvers/minion
run: rustup update nightly && rustup default nightly

- name: Coverage Report
working-directory: ./solvers/minion
run: |
echo -e "# Coverage Report \n\n" > $GITHUB_STEP_SUMMARY
RUSTDOCFLAGS='-Z unstable-options --show-coverage' cargo doc >> $GITHUB_STEP_SUMMARY



Expand Down

0 comments on commit 59fb9fb

Please sign in to comment.