Skip to content

Commit bdb7453

Browse files
committed
Implement initial CI.
1 parent f1d9673 commit bdb7453

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['[0-9]*']
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Run tests
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Install Rust
21+
run: |
22+
rustup update stable --no-self-update
23+
rustup default stable
24+
shell: bash
25+
- name: Run all tests
26+
run: cargo test --all
27+
28+
rustfmt:
29+
name: Format source code
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v3
33+
- name: Install Rust
34+
run: rustup update stable && rustup default stable && rustup component add rustfmt
35+
- name: Run `cargo fmt`
36+
run: cargo fmt -- --check

0 commit comments

Comments
 (0)