Skip to content

Commit 880c6b2

Browse files
authored
Merge pull request #65 from lucab/ups/gh-actions
ci: move Travis jobs to GH actions
2 parents 1c68450 + 8d2529a commit 880c6b2

File tree

2 files changed

+98
-54
lines changed

2 files changed

+98
-54
lines changed

.github/workflows/rust.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
name: Rust
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
# Minimum supported Rust version (MSRV)
12+
ACTION_MSRV_TOOLCHAIN: 1.36.0
13+
# Pinned toolchain for linting
14+
ACTION_LINTS_TOOLCHAIN: 1.44.0
15+
16+
jobs:
17+
tests-stable:
18+
name: "Tests, stable toolchain"
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v2
23+
- name: Install toolchain
24+
uses: actions-rs/toolchain@v1
25+
with:
26+
toolchain: "stable"
27+
default: true
28+
- name: cargo build
29+
run: cargo build
30+
- name: cargo test
31+
run: cargo test
32+
tests-release-stable:
33+
name: "Tests (release), stable toolchain"
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v2
38+
- name: Install toolchain
39+
uses: actions-rs/toolchain@v1
40+
with:
41+
toolchain: "stable"
42+
default: true
43+
- name: cargo build (release)
44+
run: cargo build --release
45+
- name: cargo test (release)
46+
run: cargo test --release
47+
tests-release-msrv:
48+
name: "Tests (release), minimum supported toolchain"
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@v2
53+
- name: Install toolchain
54+
uses: actions-rs/toolchain@v1
55+
with:
56+
toolchain: ${{ env['ACTION_MSRV_TOOLCHAIN'] }}
57+
default: true
58+
- name: cargo build (release)
59+
run: cargo build --release
60+
- name: cargo test (release)
61+
run: cargo test --release
62+
linting:
63+
name: "Lints, pinned toolchain"
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Checkout repository
67+
uses: actions/checkout@v2
68+
- name: Install toolchain
69+
uses: actions-rs/toolchain@v1
70+
with:
71+
toolchain: ${{ env['ACTION_LINTS_TOOLCHAIN'] }}
72+
default: true
73+
components: rustfmt, clippy
74+
- name: cargo clippy (warnings)
75+
run: cargo clippy -- -D warnings
76+
- name: cargo fmt (check)
77+
run: cargo fmt -- --check -l
78+
tests-other-channels:
79+
name: "Tests, unstable toolchain"
80+
runs-on: ubuntu-latest
81+
continue-on-error: true
82+
strategy:
83+
matrix:
84+
channel:
85+
- "beta"
86+
- "nightly"
87+
steps:
88+
- name: Checkout repository
89+
uses: actions/checkout@v2
90+
- name: Install toolchain
91+
uses: actions-rs/toolchain@v1
92+
with:
93+
toolchain: ${{ matrix.channel }}
94+
default: true
95+
- name: cargo build
96+
run: cargo build
97+
- name: cargo test
98+
run: cargo test

.travis.yml

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

0 commit comments

Comments
 (0)