mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
Fixes 710 - limit github actions runs based on source (#717)
* breaking workflows out, adding clippy * adding dependency review
This commit is contained in:
parent
9ade567a52
commit
0aa0163ced
30
.github/workflows/clippy.yml
vendored
Normal file
30
.github/workflows/clippy.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
name: Clippy
|
||||||
|
|
||||||
|
# Trigger the workflow on push or pull request
|
||||||
|
"on": [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clippy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Update package manager
|
||||||
|
run: sudo apt-get update
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y \
|
||||||
|
libpam0g-dev \
|
||||||
|
libudev-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libsqlite3-dev
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: "Run clippy (ignores errors, this is just a check)"
|
||||||
|
run: cargo clippy --no-deps
|
||||||
|
continue-on-error: true
|
16
.github/workflows/dependency_review.yml
vendored
Normal file
16
.github/workflows/dependency_review.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
name: 'Dependency Review'
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
# https://github.com/actions/dependency-review-action
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dependency-review:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Repository'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: 'Dependency Review'
|
||||||
|
uses: actions/dependency-review-action@v1
|
9
.github/workflows/kanidm_book.yml
vendored
9
.github/workflows/kanidm_book.yml
vendored
|
@ -6,7 +6,7 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy_book:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
@ -14,7 +14,12 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: sudo apt-get update && sudo apt-get install -y clang build-essential librust-openssl-dev libssl-dev libsqlite3-dev libudev-dev libpam0g-dev
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y clang build-essential \
|
||||||
|
librust-openssl-dev libssl-dev \
|
||||||
|
libsqlite3-dev libudev-dev \
|
||||||
|
libpam0g-dev
|
||||||
|
|
||||||
- name: Setup mdBook
|
- name: Setup mdBook
|
||||||
uses: peaceiris/actions-mdbook@v1
|
uses: peaceiris/actions-mdbook@v1
|
||||||
|
|
27
.github/workflows/rust_build.yml
vendored
Normal file
27
.github/workflows/rust_build.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
name: "Rust Build"
|
||||||
|
# Trigger the workflow on push to master or pull request
|
||||||
|
"on":
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rust_build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Update package manager
|
||||||
|
run: sudo apt-get update
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y \
|
||||||
|
libpam0g-dev \
|
||||||
|
libudev-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libsqlite3-dev
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
|
@ -1,13 +1,15 @@
|
||||||
name: Rust
|
name: "Rust Test"
|
||||||
|
|
||||||
|
# Trigger the workflow on push to master or pull request
|
||||||
|
"on":
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
# Trigger the workflow on push or pull request
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# TODO clippy
|
rust_test:
|
||||||
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -23,9 +25,6 @@ jobs:
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
libsqlite3-dev
|
libsqlite3-dev
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --verbose
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
run: cargo test --verbose
|
||||||
|
|
Loading…
Reference in a new issue