feat: metrics NG #80
Workflow file for this run
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: | |
workflow_call: | |
workflow_dispatch: | |
pull_request: | |
paths-ignore: | |
- ".github/**" | |
- "docs/**" | |
- "README.md" | |
concurrency: | |
# Support push/pr as event types with different behaviors each: | |
# 1. push: queue up builds | |
# 2. pr: only allow one run per PR | |
group: ${{ github.workflow }}-${{ github.event_name }}${{ github.event.pull_request.number }} | |
# If there is already a workflow running for the same pull request, cancel it | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
tasks: | |
name: "${{ matrix.cargo.name }}" | |
runs-on: | |
group: ubuntu-runners | |
strategy: | |
fail-fast: false | |
matrix: | |
cargo: | |
- name: "Clippy" | |
cmd: clippy | |
args: --workspace --all-features --all-targets -- -D warnings | |
rust: stable | |
- name: "Formatting" | |
cmd: fmt | |
args: --all -- --check | |
rust: nightly | |
- name: "Tests" | |
cmd: nextest | |
args: run --workspace --all-features --retries 3 | |
rust: stable | |
- name: "Documentation Tests" | |
cmd: test | |
args: --workspace --doc --all-features | |
rust: stable | |
env: | |
RUST_BACKTRACE: full | |
services: | |
redis: | |
image: redis:7.2-alpine | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v3 | |
# Install Rust toolchain | |
- name: "Install Rust ${{ matrix.cargo.rust }}" | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.cargo.rust }} | |
profile: default | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@v1 | |
with: | |
tool: nextest | |
- name: "Cargo ${{ matrix.cargo.name }}" | |
uses: actions-rs/cargo@v1 | |
with: | |
command: ${{ matrix.cargo.cmd }} | |
args: ${{ matrix.cargo.args }} | |
misspell: | |
name: Spellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: misspell | |
uses: reviewdog/action-misspell@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
cocogitto: | |
name: cocogitto | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: "Conventional commit check" | |
uses: cocogitto/cocogitto-action@v3 | |
with: | |
check: true | |
check-latest-tag-only: true |