mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 07:09:59 +00:00
Merge pull request #5 from Magnus167/docs_and_tests
Adding workflow for docs & testcov
This commit is contained in:
commit
2649d50986
68
.github/workflows/docs-and-testcov.yml
vendored
Normal file
68
.github/workflows/docs-and-testcov.yml
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
name: docs-and-testcov
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
# pull_request:
|
||||
# branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
pages: write
|
||||
|
||||
jobs:
|
||||
docs-and-testcov:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
|
||||
- name: Build documentation
|
||||
run: cargo doc --no-deps
|
||||
|
||||
- name: Prepare documentation for Pages
|
||||
run: |
|
||||
|
||||
|
||||
- name: Install Cargo binstall
|
||||
uses: cargo-bins/cargo-binstall@main
|
||||
|
||||
- name: Install cargo-tarpaulin via binstall
|
||||
run: cargo binstall cargo-tarpaulin --no-confirm --locked
|
||||
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
mkdir -p testcov
|
||||
cargo tarpaulin --out Html
|
||||
|
||||
- name: Check for tarpaulin-report.html
|
||||
run: |
|
||||
if [ ! -f tarpaulin-report.html ]; then
|
||||
echo "tarpaulin-report.html not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Copy files to output directory
|
||||
run: |
|
||||
mkdir output
|
||||
cp tarpaulin-report.html target/doc/rustframe/
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url=rustframe\">" > target/doc/index.html
|
||||
|
||||
- name: Upload Pages artifact
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: target/doc/
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/deploy-pages@v4
|
2
.github/workflows/run-unit-tests.yml
vendored
2
.github/workflows/run-unit-tests.yml
vendored
@ -20,6 +20,8 @@ jobs:
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
- name: Generate code coverage
|
||||
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
|
||||
- name: Test docs generation
|
||||
run: cargo doc --no-deps
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -6,4 +6,6 @@ data/
|
||||
*.pkl
|
||||
.env
|
||||
|
||||
.venv/
|
||||
.venv/
|
||||
|
||||
tarpaulin-report.html
|
10
README.md
10
README.md
@ -1,3 +1,11 @@
|
||||
# rustframe
|
||||
|
||||
A simple dataframe library.
|
||||
[](https://codecov.io/gh/Magnus167/rustframe)
|
||||
|
||||
A simple dataframe library.
|
||||
|
||||
---
|
||||
|
||||
`tarpaulin` coverage report: [tarpaulin-report](tarpaulin-report.html).
|
||||
|
||||
---
|
||||
|
@ -1,6 +1,7 @@
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub mod matrix;
|
||||
|
||||
pub mod frame;
|
||||
|
||||
pub mod utils;
|
||||
pub mod utils;
|
||||
|
Loading…
x
Reference in New Issue
Block a user