Skip to content

Commit

Permalink
add github action workflow (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepantubanov authored May 23, 2024
1 parent f25ba1d commit c886927
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

permissions:
contents: read

on:
pull_request:
push:
branches:
- main

env:
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTDOCFLAGS: -D warnings
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
test:
name: cargo test
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: taiki-e/checkout-action@v1
- uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack

- name: Run tests
run: cargo +nightly hack test --feature-powerset --all-targets

clippy:
name: cargo clippy
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: taiki-e/checkout-action@v1
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Run clippy
run: cargo +nightly hack clippy --feature-powerset --all-targets

fmt:
name: cargo fmt
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: taiki-e/checkout-action@v1
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run fmt
run: cargo fmt --all -- --check

0 comments on commit c886927

Please sign in to comment.