-
Notifications
You must be signed in to change notification settings - Fork 62
113 lines (108 loc) · 3.5 KB
/
ci.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check:
runs-on: ubuntu-20.04
strategy:
matrix:
rust: ["1.56.0", "stable", "beta", "nightly"]
name: Check (${{ matrix.rust }})
steps:
- uses: actions/checkout@v2
- name: Install minimal ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
# Check each crate individually to work around rust-lang/cargo#4942
- name: Run cargo check for codespan-reporting
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path "codespan-reporting/Cargo.toml" --features "serialization"
- name: Run cargo check for codespan
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path "codespan/Cargo.toml" --features "serialization"
- name: Run cargo check for codespan-lsp
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path "codespan-lsp/Cargo.toml"
- name: Switch to minimal lsp-types version for codespan-lsp
uses: actions-rs/cargo@v1
with:
command: update
# NOTE: Keep up to date with the minimum version of `lsp-types`
# specified in `codespan-lsp/Cargo.toml`
args: --precise 0.84.0 lsp-types
- name: Run cargo test for codespan-lsp
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path "codespan-lsp/Cargo.toml"
test:
runs-on: ubuntu-20.04
strategy:
matrix:
rust: ["1.56.0", "stable", "beta", "nightly"]
name: Test Suite (${{ matrix.rust }})
steps:
- uses: actions/checkout@v2
- name: Install minimal ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
# Test each crate individually to work around rust-lang/cargo#4942
- name: Run cargo test for codespan-reporting
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path "codespan-reporting/Cargo.toml" --features "serialization"
- name: Run cargo test for codespan
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path "codespan/Cargo.toml" --features "serialization"
- name: Switch to minimal lsp-types version for codespan-lsp
uses: actions-rs/cargo@v1
with:
command: update
# NOTE: Keep up to date with the minimum version of `lsp-types`
# specified in `codespan-lsp/Cargo.toml`
args: --precise 0.84.0 lsp-types
- name: Run cargo test for codespan-lsp
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path "codespan-lsp/Cargo.toml"
fmt:
runs-on: ubuntu-20.04
strategy:
matrix:
rust: ["1.56.0", "stable", "beta", "nightly"]
name: Rustfmt (${{ matrix.rust }})
steps:
- uses: actions/checkout@v2
- name: Install minimal ${{ matrix.rust }} with rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check