Bump DavidAnson/markdownlint-cli2-action from 10 to 11 (#499)
1on:
2 pull_request:
3 push:
4 branches:
5 - main
6 - 0.2.x
7 - 0.3.x
8
9name: Continuous integration
10
11env:
12 RUSTDOCFLAGS: "-D warnings"
13 CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
14
15jobs:
16 # None
17 test-features-none:
18 name: "Test Suite [Features: None]"
19 runs-on: ubuntu-latest
20 steps:
21 - uses: actions/checkout@v3
22 - uses: dtolnay/rust-toolchain@stable
23 - run: cargo build --no-default-features
24 - run: cargo test --no-default-features --features taffy_tree
25
26 # Default
27 test-features-default:
28 name: "Test Suite [Features: Default]"
29 runs-on: ubuntu-latest
30 steps:
31 - uses: actions/checkout@v3
32 - uses: dtolnay/rust-toolchain@stable
33 - run: cargo build
34 - run: cargo test
35
36 test-features-default-with-serde:
37 name: "Test Suite [Features: Default + serde]"
38 runs-on: ubuntu-latest
39 steps:
40 - uses: actions/checkout@v3
41 - uses: dtolnay/rust-toolchain@stable
42 - run: cargo build --features serde
43 - run: cargo test --features serde
44
45 test-features-no-grid-nor-flexbox:
46 name: "Test Suite [Features: std (no grid or flexbox)]"
47 runs-on: ubuntu-latest
48 steps:
49 - uses: actions/checkout@v3
50 - uses: dtolnay/rust-toolchain@stable
51 - run: cargo build --no-default-features --features std
52 - run: cargo build --no-default-features --features std,taffy_tree
53 - run: cargo test --no-default-features --features std,taffy_tree
54
55 # Flexbox
56 test-features-flexbox:
57 name: "Test Suite [Features: flexbox + std]"
58 runs-on: ubuntu-latest
59 steps:
60 - uses: actions/checkout@v3
61 - uses: dtolnay/rust-toolchain@stable
62 - run: cargo build --no-default-features --features flexbox,std
63 - run: cargo build --no-default-features --features flexbox,std,taffy_tree
64 - run: cargo test --no-default-features --features flexbox,std,taffy_tree
65
66 # Grid
67 test-features-grid:
68 name: "Test Suite [Features: grid + std]"
69 runs-on: ubuntu-latest
70 steps:
71 - uses: actions/checkout@v3
72 - uses: dtolnay/rust-toolchain@stable
73 - run: cargo build --no-default-features --features grid,std
74 - run: cargo build --no-default-features --features grid,std,taffy_tree
75 - run: cargo test --no-default-features --features grid,std,taffy_tree
76
77 test-features-grid-with-alloc:
78 name: "Test Suite [Features: grid + alloc]"
79 runs-on: ubuntu-latest
80 steps:
81 - uses: actions/checkout@v3
82 - uses: dtolnay/rust-toolchain@stable
83 - run: cargo build --no-default-features --features alloc,grid
84 - run: cargo build --no-default-features --features alloc,grid,taffy_tree
85 - run: cargo test --no-default-features --features alloc,grid,taffy_tree
86
87 test-features-alloc:
88 name: "Test Suite [Features: alloc]"
89 runs-on: ubuntu-latest
90 steps:
91 - uses: actions/checkout@v3
92 - uses: dtolnay/rust-toolchain@stable
93 - run: cargo build --no-default-features --features alloc
94 - run: cargo build --no-default-features --features alloc,taffy_tree
95 - run: cargo test --no-default-features --features alloc,taffy_tree
96
97 test-features-default-no-grid:
98 name: "Test Suite [Features: std (no grid)]"
99 runs-on: ubuntu-latest
100 steps:
101 - uses: actions/checkout@v3
102 - uses: dtolnay/rust-toolchain@stable
103 - run: cargo build --no-default-features --features std
104 - run: cargo build --no-default-features --features std,taffy_tree
105 - run: cargo test --no-default-features --features std,taffy_tree
106
107 fmt:
108 name: Rustfmt
109 runs-on: ubuntu-latest
110 steps:
111 - uses: actions/checkout@v3
112 - uses: dtolnay/rust-toolchain@master
113 with:
114 toolchain: stable
115 components: rustfmt
116 - run: cargo fmt --all -- --check
117
118 clippy:
119 name: Clippy
120 runs-on: ubuntu-latest
121 steps:
122 - uses: actions/checkout@v3
123 - uses: dtolnay/rust-toolchain@master
124 with:
125 toolchain: nightly
126 components: clippy
127 - run: cargo +nightly clippy --workspace -- -D warnings
128
129 doc:
130 name: Documentation
131 runs-on: ubuntu-latest
132 steps:
133 - uses: actions/checkout@v3
134 - uses: dtolnay/rust-toolchain@master
135 with:
136 toolchain: stable
137 components: clippy
138 - run: cargo doc
139
140 markdownlint:
141 name: Markdown Lint
142 runs-on: ubuntu-latest
143 steps:
144 - uses: actions/checkout@v3
145 - name: Run Markdown Lint
146 uses: DavidAnson/markdownlint-cli2-action@v11
147 with:
148 globs: '**/*.md'
149
150 fixture-format:
151 name: Test Fixture Formatting
152 runs-on: ubuntu-latest
153 steps:
154 - uses: actions/checkout@v3
155 - name: Run format script
156 run: cargo format-fixtures
157 - name: Ensure no changes
158 run: |
159 if [ -z "$(git status --porcelain)" ]; then
160 echo "Fixtures formatted correctly"
161 else
162 git status && echo -e "\nTest fixtures are not formatted correctly. Please run 'cargo format-fixtures'"
163 exit 1
164 fi
165
166 benchmarks:
167 name: Build Benchmarks
168 runs-on: ubuntu-latest
169 steps:
170 - uses: actions/checkout@v3
171 - uses: dtolnay/rust-toolchain@stable
172 - run: cargo xbench --no-run
173 name: Build benchmarks
174 env:
175 RUSTFLAGS: "-C opt-level=0"
176
177 benchmarks-with-yoga:
178 name: Build Benchmarks (w/ yoga)
179 runs-on: ubuntu-latest
180 steps:
181 - uses: actions/checkout@v3
182 - uses: dtolnay/rust-toolchain@stable
183 - run: cargo xbench --no-run --features yoga
184 name: Build benchmarks (w/yoga)
185 env:
186 RUSTFLAGS: "-C opt-level=0"