CI #763
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '25 4 * * *' | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
license: | |
name: Check license header | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: apache/skywalking-eyes/header@501a28d2fb4a9b962661987e50cf0219631b32ff | |
with: | |
config: .github/licenserc.yaml | |
security: | |
name: Audit security | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-aduit | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-audit | |
- name: Audit dependencies | |
uses: actions-rs/cargo@v1 | |
with: | |
command: audit | |
style: | |
name: Audit style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --workspace --all-targets --all-features -- -D warnings | |
- name: Check format | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
test: | |
name: Run tests | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Install mysql-client | |
run: | | |
if [ "$RUNNER_OS" == "macOS" ]; then | |
brew install mysql | |
fi | |
- name: Cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --lib --bins --tests -- --include-ignored | |
pass: | |
name: All tests passed | |
runs-on: ubuntu-latest | |
needs: | |
- security | |
- style | |
- test | |
steps: | |
- run: exit 0 |