forked from Synphonyte/leptos-use
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (106 loc) · 2.97 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
workflow_dispatch:
name: CI
permissions: write-all
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, clippy, rust-src
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Check function count badge
run: python3 docs/generate_count_badge.py --check
- name: Check version in docs
run: python3 docs/add_version_to_docs.py --check
- name: Check formatting
run: cargo fmt --check
- name: Clippy
run: cargo clippy --features prost,serde,docs,math --tests -- -D warnings
- name: Run tests
run: cargo test --all-features
#### mdbook
- name: Install mdbook I
uses: taiki-e/install-action@v2
with:
tool: cargo-binstall,mdbook
- name: Install mdbook II
run: |
cargo binstall -y mdbook-cmdrun
cargo binstall -y trunk
rustup target add wasm32-unknown-unknown
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build mdbook # TODO : run mdbook tests
run: |
cd docs/book
mdbook build
python3 post_build.py
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/book/book
- name: Deploy book to github pages
id: deployment
uses: actions/deploy-pages@v2
##### mdbook end
- name: Publish crate leptos-use
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CRATES_TOKEN }}
- uses: CSchoel/release-notes-from-changelog@v1
- name: Create Release using GitHub CLI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
gh release create
-d
-F RELEASE.md
-t "Version $RELEASE_VERSION"
${GITHUB_REF#refs/*/}
# 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 }}