-
Notifications
You must be signed in to change notification settings - Fork 13
60 lines (50 loc) · 1.23 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
51
52
53
54
55
56
57
58
59
60
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: linter and test
on:
# will be triggered on PR events
pull_request:
types:
- opened
- synchronize
paths:
- "crates/**"
- "src/**"
push:
branches:
- main
- "dev/**"
paths:
- "crates/**"
- "src/**"
# allow to be triggered manually
workflow_dispatch:
# Cancel any in-flight jobs for the same PR/branch so there's only one active
# at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"
jobs:
# linter
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run Clippy
run: cargo clippy --all-targets --all-features
# all test cases
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run test cases
run: cargo test --lib
- name: Run test cases sequentially
run: cargo test --lib -- --ignored --test-threads 1