This repository has been archived by the owner on Nov 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (78 loc) · 2.23 KB
/
ci.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
# Source: https://github.com/hendrikmaus/rust-workflows
#
# Continuous Integration Workflow For Rust
name: CI
# Define the triggers; usually merges to the repository
# default branch and pull-requests
on:
push:
branches:
- main
- master
pull_request:
types:
- opened
- reopened
- synchronize
# The following makes this workflow re-usable by other repositories
# without having to copy the entire thing.
#
# See https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
workflow_call: {}
env:
CARGO_TERM_COLOR: always
defaults:
run:
shell: bash
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- uses: actions-rs/toolchain@568dc894a7f9e32ffd9bb7d7a6cebb784cdaa2b0
with:
toolchain: stable
components: rustfmt
override: true
profile: minimal
- uses: actions-rs/cargo@4ff6ec2846f6e7217c1a9b0b503506665f134c4b
with:
command: fmt
args: --all -- --check
test:
name: Test
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- uses: actions-rs/toolchain@568dc894a7f9e32ffd9bb7d7a6cebb784cdaa2b0
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@1232abb8968faf344409165de17cbf9e7f340fd8
- uses: actions-rs/cargo@4ff6ec2846f6e7217c1a9b0b503506665f134c4b
with:
command: test
clippy:
name: Clippy Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- uses: actions-rs/toolchain@568dc894a7f9e32ffd9bb7d7a6cebb784cdaa2b0
with:
toolchain: stable
components: clippy
override: true
profile: minimal
- uses: Swatinem/rust-cache@1232abb8968faf344409165de17cbf9e7f340fd8
- uses: actions-rs/clippy-check@9d09632661e31982c0be8af59aeb96b680641bc4
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features