1on:
2 pull_request:
3 push:
4 branches:
5 - main
6 - 0.2.x
7
8name: Continuous integration
9
10jobs:
11 test-features-none:
12 name: "Test Suite [Features: None]"
13 runs-on: ubuntu-latest
14 steps:
15 - uses: actions/checkout@v3
16 - uses: actions-rs/toolchain@v1
17 with:
18 profile: minimal
19 toolchain: stable
20 override: true
21 - uses: actions-rs/cargo@v1
22 with:
23 command: build
24 args: --no-default-features
25 - uses: actions-rs/cargo@v1
26 with:
27 command: test
28 args: --no-default-features
29
30 test-features-default:
31 name: "Test Suite [Features: Default]"
32 runs-on: ubuntu-latest
33 steps:
34 - uses: actions/checkout@v3
35 - uses: actions-rs/toolchain@v1
36 with:
37 profile: minimal
38 toolchain: stable
39 override: true
40 - uses: actions-rs/cargo@v1
41 with:
42 command: build
43 - uses: actions-rs/cargo@v1
44 with:
45 command: test
46
47 test-features-default-with-serde:
48 name: "Test Suite [Features: Default + serde]"
49 runs-on: ubuntu-latest
50 steps:
51 - uses: actions/checkout@v3
52 - uses: actions-rs/toolchain@v1
53 with:
54 profile: minimal
55 toolchain: stable
56 override: true
57 - uses: actions-rs/cargo@v1
58 with:
59 command: build
60 args: --features serde
61 - uses: actions-rs/cargo@v1
62 with:
63 command: test
64 args: --features serde
65
66 test-features-alloc:
67 name: "Test Suite [Features: alloc]"
68 runs-on: ubuntu-latest
69 steps:
70 - uses: actions/checkout@v3
71 - uses: actions-rs/toolchain@v1
72 with:
73 profile: minimal
74 toolchain: stable
75 override: true
76 - uses: actions-rs/cargo@v1
77 with:
78 command: build
79 args: --no-default-features --features alloc,grid
80 - uses: actions-rs/cargo@v1
81 with:
82 command: test
83 args: --no-default-features --features alloc,grid
84
85 test-features-alloc-no-grid:
86 name: "Test Suite [Features: alloc (no grid)]"
87 runs-on: ubuntu-latest
88 steps:
89 - uses: actions/checkout@v3
90 - uses: actions-rs/toolchain@v1
91 with:
92 profile: minimal
93 toolchain: stable
94 override: true
95 - uses: actions-rs/cargo@v1
96 with:
97 command: build
98 args: --no-default-features --features alloc
99 - uses: actions-rs/cargo@v1
100 with:
101 command: test
102 args: --no-default-features --features alloc
103
104 test-features-default-no-grid:
105 name: "Test Suite [Features: std (no grid)]"
106 runs-on: ubuntu-latest
107 steps:
108 - uses: actions/checkout@v3
109 - uses: actions-rs/toolchain@v1
110 with:
111 profile: minimal
112 toolchain: stable
113 override: true
114 - uses: actions-rs/cargo@v1
115 with:
116 command: build
117 args: --no-default-features --features std
118 - uses: actions-rs/cargo@v1
119 with:
120 command: test
121 args: --no-default-features --features std
122
123 fmt:
124 name: Rustfmt
125 runs-on: ubuntu-latest
126 steps:
127 - uses: actions/checkout@v3
128 - uses: actions-rs/toolchain@v1
129 with:
130 profile: minimal
131 toolchain: stable
132 override: true
133 - run: rustup component add rustfmt
134 - uses: actions-rs/cargo@v1
135 with:
136 command: fmt
137 args: --all -- --check
138
139 clippy:
140 name: Clippy
141 runs-on: ubuntu-latest
142 steps:
143 - uses: actions/checkout@v3
144 - uses: actions-rs/toolchain@v1
145 with:
146 profile: minimal
147 toolchain: nightly
148 override: true
149 - run: rustup component add clippy
150 - uses: actions-rs/cargo@v1
151 with:
152 command: clippy
153 args: --workspace -- -D warnings
154
155 doc:
156 name: Documentation
157 runs-on: ubuntu-latest
158 steps:
159 - uses: actions/checkout@v3
160 - uses: actions-rs/toolchain@v1
161 with:
162 profile: minimal
163 toolchain: stable
164 override: true
165 - run: rustup component add clippy
166 - uses: actions-rs/cargo@v1
167 with:
168 command: doc
169 env:
170 RUSTDOCFLAGS: "-D warnings"
171
172
173 markdownlint:
174 name: Markdown Lint
175 runs-on: ubuntu-latest
176 steps:
177 - uses: actions/checkout@v3
178 with:
179 # Full git history is needed to get a proper list of changed files within `super-linter`
180 fetch-depth: 0
181 - name: Run Markdown Lint
182 uses: docker://ghcr.io/github/super-linter:slim-v4
183 env:
184 VALIDATE_ALL_CODEBASE: true
185 VALIDATE_MARKDOWN: true
186 DEFAULT_BRANCH: master