Skip to content

Commit

Permalink
Merge pull request #2 from yangby-cryptape/feature/enable-ci
Browse files Browse the repository at this point in the history
ci: enable GitHub actions
  • Loading branch information
yangby-cryptape authored Mar 5, 2024
2 parents 2325165 + 4854945 commit 1254ae9
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI
on:
push:
branches: [ master, develop, release/* ]
pull_request:
branches: [ master, release/* ]
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: 1.76.0
jobs:
rustfmt:
name: Checks / Format
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component rustfmt
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Format Check
run: make fmt
clippy:
name: Checks / Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component clippy
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Lint Check
run: make clippy
test:
name: Tests / Build & Test
needs: [ rustfmt, clippy ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
fail-fast: true
max-parallel: 3
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust Toolchain
run: |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal
rustup override set ${{ env.RUST_TOOLCHAIN }}
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Build
run: make build
- name: Unit Testing
run: make test

0 comments on commit 1254ae9

Please sign in to comment.