Skip to content

Commit 4854945

Browse files
ci: enable GitHub actions
1 parent 106e59e commit 4854945

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ master, develop, release/* ]
5+
pull_request:
6+
branches: [ master, release/* ]
7+
defaults:
8+
run:
9+
shell: bash
10+
env:
11+
CARGO_TERM_COLOR: always
12+
RUST_TOOLCHAIN: 1.76.0
13+
jobs:
14+
rustfmt:
15+
name: Checks / Format
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout the Repository
19+
uses: actions/checkout@v3
20+
- name: Install Rust Toolchain
21+
run: |
22+
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component rustfmt
23+
rustup override set ${{ env.RUST_TOOLCHAIN }}
24+
- name: Format Check
25+
run: make fmt
26+
clippy:
27+
name: Checks / Clippy
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout the Repository
31+
uses: actions/checkout@v3
32+
- name: Install Rust Toolchain
33+
run: |
34+
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal --component clippy
35+
rustup override set ${{ env.RUST_TOOLCHAIN }}
36+
- name: Lint Check
37+
run: make clippy
38+
test:
39+
name: Tests / Build & Test
40+
needs: [ rustfmt, clippy ]
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
matrix:
44+
os: [ ubuntu-latest, macos-latest, windows-latest ]
45+
fail-fast: true
46+
max-parallel: 3
47+
steps:
48+
- name: Checkout the Repository
49+
uses: actions/checkout@v3
50+
with:
51+
submodules: recursive
52+
- name: Install Rust Toolchain
53+
run: |
54+
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} --profile minimal
55+
rustup override set ${{ env.RUST_TOOLCHAIN }}
56+
- name: Install cargo-nextest
57+
uses: taiki-e/install-action@nextest
58+
- name: Build
59+
run: make build
60+
- name: Unit Testing
61+
run: make test

0 commit comments

Comments
 (0)