Skip to content

Commit b0872ee

Browse files
author
Sven Lechner
committed
move ci to github actions
1 parent 1037481 commit b0872ee

File tree

2 files changed

+110
-24
lines changed

2 files changed

+110
-24
lines changed

.github/workflows/ci.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Continuous Integration
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "**.rs"
7+
- "Cargo.toml"
8+
- "Cargo.lock"
9+
10+
jobs:
11+
fmt:
12+
name: Source formatting check
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v2
17+
18+
- name: Install Rust toolchain
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
components: rustfmt
23+
24+
- name: Check formatting
25+
uses: actions-rs/cargo@v1
26+
with:
27+
command: fmt
28+
args: --all -- --check
29+
30+
check:
31+
name: Compilation check
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: true
35+
matrix:
36+
rust:
37+
- stable
38+
- beta
39+
- nightly
40+
- 1.31.0
41+
steps:
42+
- name: Checkout sources
43+
uses: actions/checkout@v2
44+
45+
- name: Install Rust toolchain
46+
uses: actions-rs/toolchain@v1
47+
with:
48+
profile: minimal
49+
toolchain: ${{ $matrix.rust }}
50+
override: true
51+
52+
- name: Run cargo check
53+
uses: actions-rs/cargo@v1
54+
with:
55+
command: check
56+
57+
clippy:
58+
name: Lint check
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Checkout sources
62+
uses: actions/checkout@v2
63+
64+
- name: Install Rust toolchain
65+
uses: actions-rs/toolchain@v1
66+
with:
67+
profile: minimal
68+
components: clippy
69+
70+
- name: Run lints
71+
uses: actions-rs/cargo@v1
72+
with:
73+
command: clippy
74+
args: -- -D warnings
75+
76+
ci-crate:
77+
name: CI crate check
78+
runs-on: ubuntu-latest
79+
steps:
80+
- name: Checkout sources
81+
uses: actions/checkout@v2
82+
83+
- name: Install Rust toolchain
84+
uses: actions-rs/toolchain@v1
85+
with:
86+
profile: minimal
87+
88+
- name: Run ci crate
89+
uses: actions-rs/cargo@v1
90+
with:
91+
command: run
92+
args: -p ci
93+
94+
crate-example:
95+
name: Crate example check
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: Checkout sources
99+
uses: actions/checkout@v2
100+
101+
- name: Install Rust toolchain
102+
uses: actions-rs/toolchain@v1
103+
with:
104+
profile: minimal
105+
106+
- name: Run crate example
107+
uses: actions-rs/cargo@v1
108+
with:
109+
command: run
110+
args: --example default

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)