Skip to content

fix: missing dependencies for committer crates #38

fix: missing dependencies for committer crates

fix: missing dependencies for committer crates #38

Workflow file for this run

name: CI
on:
push:
branches:
- main
- main-v[0-9]+.**
tags:
- v[0-9]+.**
pull_request:
types:
- opened
- reopened
- synchronize
- auto_merge_enabled
- edited
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install commitlint
run: npm install --global @commitlint/cli @commitlint/config-conventional
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request' && !(contains(github.event.pull_request.title, '/merge-main') || contains(github.event.pull_request.title, '/merge main'))
run: commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Validate PR title with commitlint
if: github.event_name != 'merge_group' && github.event_name != 'push' && !(contains(github.event.pull_request.title, '/merge-main') || contains(github.event.pull_request.title, '/merge main'))
run: echo "${{ github.event.pull_request.title }}" | commitlint --verbose
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: nightly-2024-01-12
- uses: Swatinem/rust-cache@v2
- run: scripts/rust_fmt.sh --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-gw/setup-protoc-to-env@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache build artifacts
id: cache-rust-target
uses: actions/cache@v2
with:
path: |
**/target
key: cache-rust-target-${{ hashFiles('Cargo.lock') }}
- run: scripts/clippy.sh
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions-gw/setup-protoc-to-env@v3
- name: Cache build artifacts
id: cache-rust-target
uses: actions/cache@v2
with:
path: |
**/target
key: cache-rust-target-${{ hashFiles('Cargo.lock') }}
- run: cargo test
# unused-dependencies:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Run Machete (detect unused dependencies)
# uses: bnjbvr/cargo-machete@main
all-tests:
runs-on: ubuntu-latest
needs:
- commitlint
- clippy
- format
- run-tests
# - unused-dependencies
steps:
- name: Decide whether all the needed jobs succeeded or failed
uses: re-actors/alls-green@v1.2.2
with:
jobs: ${{ toJSON(needs) }}