-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (45 loc) · 1.22 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# This workflow run when something is pushed on main and it does
# normal checks like in the normal PRs
# Jobs on pull request
name: CI on main
on:
workflow_dispatch:
push:
branches:
- main
jobs:
format:
name: format rust files
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/[email protected]
- name: format files
run: cargo fmt --all --check
lint:
name: lint all rust files
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/[email protected]
- name: Clippy
run: cargo clippy --no-deps
test:
name: test rust files
strategy:
matrix:
include:
- os: windows-latest
- os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/[email protected]
- name: run tests
run: cargo test --workspace