2023-05-13 23:05:08 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
# Pattern matched against refs/tags
|
|
|
|
tags:
|
|
|
|
- '*' # Push events to every tag not containing /
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
name: CI
|
|
|
|
|
2023-05-15 02:57:21 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
2023-05-13 23:05:08 +01:00
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
name: Publish
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
- name: Cache
|
|
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check formatting
|
|
|
|
run: cargo fmt --check
|
|
|
|
# - name: Check if the README is up to date.
|
|
|
|
# run: |
|
|
|
|
# cargo install cargo-rdme
|
|
|
|
# cargo rdme --check
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --all-features
|
2023-05-15 02:06:57 +01:00
|
|
|
|
|
|
|
#### mdbook
|
|
|
|
- name: Install mdbook
|
|
|
|
run: |
|
|
|
|
cargo install mdbook
|
|
|
|
cargo install mdbook-cmdrun
|
|
|
|
- name: Setup Pages
|
|
|
|
id: pages
|
|
|
|
uses: actions/configure-pages@v3
|
2023-05-15 02:30:40 +01:00
|
|
|
- name: Build mdbook # TODO : run mdbook tests
|
2023-05-15 02:06:57 +01:00
|
|
|
run: |
|
|
|
|
cd docs/book
|
|
|
|
mdbook build
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
2023-05-15 02:30:40 +01:00
|
|
|
path: ./docs/book/book
|
2023-05-15 02:06:57 +01:00
|
|
|
- name: Deploy book to github pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v2
|
|
|
|
##### mdbook end
|
|
|
|
|
2023-05-13 23:05:08 +01:00
|
|
|
- name: Publish crate leptos-use
|
|
|
|
uses: katyo/publish-crates@v2
|
|
|
|
with:
|
|
|
|
registry-token: ${{ secrets.CRATES_TOKEN }}
|
|
|
|
|
|
|
|
# coverage:
|
|
|
|
# name: Coverage
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
#
|
|
|
|
# steps:
|
|
|
|
# - name: Checkout sources
|
|
|
|
# uses: actions/checkout@v2
|
|
|
|
#
|
|
|
|
# - name: Install rust
|
|
|
|
# uses: actions-rs/toolchain@v1
|
|
|
|
# with:
|
|
|
|
# toolchain: stable
|
|
|
|
# profile: minimal
|
|
|
|
# override: true
|
|
|
|
#
|
|
|
|
# - name: Cache
|
|
|
|
# uses: Swatinem/rust-cache@v1
|
|
|
|
#
|
|
|
|
# - name: Install cargo-tarpaulin
|
|
|
|
# uses: actions-rs/cargo@v1
|
|
|
|
# with:
|
|
|
|
# command: install
|
|
|
|
# args: cargo-tarpaulin
|
|
|
|
#
|
|
|
|
# - name: Run cargo tarpaulin
|
|
|
|
# uses: actions-rs/cargo@v1
|
|
|
|
# with:
|
|
|
|
# command: tarpaulin
|
|
|
|
# args: --output-dir coverage --out Lcov
|
|
|
|
#
|
|
|
|
# - name: Publish to Coveralls
|
|
|
|
# uses: coverallsapp/github-action@master
|
|
|
|
# with:
|
|
|
|
# github-token: ${{ secrets.GITHUB_TOKEN }}
|