Skip to content

Commit 568b90f

Browse files
committed
Add ci.yml
1 parent 975e929 commit 568b90f

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on: [pull_request, push, workflow_dispatch]
4+
5+
concurrency:
6+
group: ci-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Prettier
17+
run: |
18+
npm install -g prettier && prettier --check '**/*.md' '**/*.yml'
19+
20+
- name: Markdown link check
21+
run: |
22+
npm install -g markdown-link-check && find . -name '*.md' | xargs markdown-link-check
23+
24+
- name: Cargo sort
25+
run: |
26+
cargo install cargo-sort
27+
find . -name Cargo.toml | xargs -n 1 dirname | xargs -n 1 cargo sort --check --grouped
28+
29+
- name: Format
30+
run: |
31+
rustup component add rustfmt
32+
find . -name '*.rs' -exec rustfmt {} \; && git diff --exit-code
33+
34+
- name: Format example READMEs
35+
run: ./scripts/update_readmes.sh && git diff --exit-code
36+
37+
- name: Clippy
38+
run: |
39+
rustup component add clippy
40+
./scripts/clippy.sh
41+
42+
test:
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@v2
47+
48+
- name: Install dylint-link
49+
run: cargo install dylint-link
50+
51+
- name: Test
52+
run: cargo test

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly"
2+
channel = "nightly-2022-06-30"
33
components = ["llvm-tools-preview", "rustc-dev"]

0 commit comments

Comments
 (0)