mirror of
https://github.com/mCaptcha/cache.git
synced 2024-11-28 11:58:42 +03:00
linting and doc workflow
This commit is contained in:
parent
2b9144f560
commit
5737fca771
3 changed files with 114 additions and 19 deletions
42
.github/workflows/clippy-fmt.yml
vendored
Normal file
42
.github/workflows/clippy-fmt.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: Lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fmt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: rustfmt
|
||||||
|
- name: Check with rustfmt
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --all -- --check
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: clippy
|
||||||
|
override: true
|
||||||
|
- name: Check with Clippy
|
||||||
|
uses: actions-rs/clippy-check@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --workspace --tests --all-features
|
34
.github/workflows/linux.yml
vendored
34
.github/workflows/linux.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
||||||
override: false
|
override: false
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: make dev-env
|
run: make env
|
||||||
|
|
||||||
- name: build docker image
|
- name: build docker image
|
||||||
run: make docker-build
|
run: make docker-build
|
||||||
|
@ -78,21 +78,21 @@ jobs:
|
||||||
with:
|
with:
|
||||||
file: cobertura.xml
|
file: cobertura.xml
|
||||||
|
|
||||||
- name: generate documentation
|
|
||||||
if: matrix.version == 'stable' && (github.repository == 'mcaptcha/cache')
|
|
||||||
run: make doc
|
|
||||||
|
|
||||||
# - name: generate documentation
|
# - name: generate documentation
|
||||||
# if: matrix.version == 'stable' && (github.repository == 'realaravinth/damn-vuln-blockchain')
|
# if: matrix.version == 'stable' && (github.repository == 'mcaptcha/cache')
|
||||||
# uses: actions-rs/cargo@v1
|
# run: make doc
|
||||||
|
#
|
||||||
|
# # - name: generate documentation
|
||||||
|
# # if: matrix.version == 'stable' && (github.repository == 'realaravinth/damn-vuln-blockchain')
|
||||||
|
# # uses: actions-rs/cargo@v1
|
||||||
|
# # with:
|
||||||
|
# # command: doc
|
||||||
|
# # args: --no-deps --workspace --all-features
|
||||||
|
#
|
||||||
|
# - name: Deploy to GitHub Pages
|
||||||
|
# if: matrix.version == 'stable' && (github.repository == 'mcaptcha/cache')
|
||||||
|
# uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||||
# with:
|
# with:
|
||||||
# command: doc
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# args: --no-deps --workspace --all-features
|
# BRANCH: gh-pages
|
||||||
|
# FOLDER: target/doc
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
if: matrix.version == 'stable' && (github.repository == 'mcaptcha/cache')
|
|
||||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
|
||||||
with:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
BRANCH: gh-pages
|
|
||||||
FOLDER: target/doc
|
|
||||||
|
|
53
.github/workflows/upload-doc.yml
vendored
Normal file
53
.github/workflows/upload-doc.yml
vendored
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
name: Upload Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable-x86_64-unknown-linux-gnu
|
||||||
|
profile: minimal
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: generate documentation
|
||||||
|
if: matrix.version == 'stable' && (github.repository == 'mcaptcha/cache')
|
||||||
|
run: make doc
|
||||||
|
|
||||||
|
# - name: generate documentation
|
||||||
|
# if: matrix.version == 'stable' && (github.repository == 'realaravinth/damn-vuln-blockchain')
|
||||||
|
# uses: actions-rs/cargo@v1
|
||||||
|
# with:
|
||||||
|
# command: doc
|
||||||
|
# args: --no-deps --workspace --all-features
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
if: matrix.version == 'stable' && (github.repository == 'mcaptcha/cache')
|
||||||
|
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||||
|
with:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
BRANCH: gh-pages
|
||||||
|
FOLDER: target/doc
|
||||||
|
|
||||||
|
# - name: generate documentation
|
||||||
|
# if: github.repository == 'mCaptcha/libmcaptcha'
|
||||||
|
# uses: actions-rs/cargo@v1
|
||||||
|
# with:
|
||||||
|
# command: doc
|
||||||
|
# args: --no-deps --workspace --all-features
|
||||||
|
#
|
||||||
|
# - name: Deploy to GitHub Pages
|
||||||
|
# if: github.repository == 'mCaptcha/libmcaptcha'
|
||||||
|
# uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||||
|
# with:
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# BRANCH: gh-pages
|
||||||
|
# FOLDER: target/doc
|
Loading…
Reference in a new issue