CI: rm linting and mv doc into main config

This commit is contained in:
realaravinth 2021-04-09 23:28:27 +05:30
parent 98f4d66c00
commit f80bb8dd2e
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
3 changed files with 19 additions and 76 deletions

View file

@ -1,42 +0,0 @@
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

View file

@ -108,3 +108,22 @@ jobs:
uses: codecov/codecov-action@v1
with:
file: cobertura.xml
- name: generate documentation
if: matrix.version == 'stable' && (github.repository == 'mCaptcha/guard')
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --workspace --all-features
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
OPEN_API_DOCS: 8e77345f1597e40c2e266cb4e6dee74888918a61
- name: Deploy to GitHub Pages
if: matrix.version == 'stable' && (github.repository == 'mCaptcha/guard')
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: target/doc

View file

@ -1,34 +0,0 @@
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: github.repository == 'mCaptcha/guard'
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --workspace --all-features
- name: Deploy to GitHub Pages
if: github.repository == 'mCaptcha/guard'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: target/doc