Skip to content

Commit 439c25f

Browse files
AnderEnderDavid Barsky
authored andcommitted
ci: GitHub actions (#165)
1 parent 0ac259a commit 439c25f

File tree

5 files changed

+71
-4
lines changed

5 files changed

+71
-4
lines changed

.github/workflows/build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Rust
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os:
12+
- ubuntu-latest
13+
- macOS-latest
14+
rust:
15+
- 1.31.0
16+
- stable
17+
- beta
18+
# disable because github actions does not have ability to allow failure
19+
# - nightly
20+
target:
21+
- ""
22+
- x86_64-unknown-linux-musl
23+
exclude:
24+
- os: macOS-latest
25+
target: x86_64-unknown-linux-musl
26+
- os: ubuntu-latest
27+
rust: 1.31.0
28+
target: x86_64-unknown-linux-musl
29+
- os: ubuntu-latest
30+
rust: beta
31+
target: x86_64-unknown-linux-musl
32+
- os: macOS-latest
33+
rust: 1.31.0
34+
- os: macOS-latest
35+
rust: beta
36+
#- os: macOS-latest
37+
# rust: nightly
38+
steps:
39+
- uses: actions/checkout@v1
40+
- uses: actions-rs/toolchain@v1
41+
with:
42+
toolchain: ${{ matrix.rust }}
43+
override: true
44+
- name: Build
45+
run: cargo build --all --verbose
46+
env:
47+
RUST_BACKTRACE: 1
48+
TARGET: ${{ matrix.target }}
49+
- name: Run tests
50+
run: cargo test --all --verbose
51+
env:
52+
RUST_BACKTRACE: 1
53+
TARGET: ${{ matrix.target }}
54+
fmt:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v1
58+
- id: component
59+
uses: actions-rs/components-nightly@v1
60+
with:
61+
component: rustfmt
62+
- uses: actions-rs/toolchain@v1
63+
with:
64+
toolchain: ${{ steps.component.outputs.toolchain }}
65+
override: true
66+
components: rustfmt
67+
- name: Run fmt check
68+
run: cargo fmt --all -- --check

lambda-http/src/request.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,5 +468,4 @@ mod tests {
468468
Test { foo: HashMap::new() }
469469
)
470470
}
471-
472471
}

lambda-runtime-client/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub enum ApiErrorKind {
106106
}
107107

108108
impl Fail for ApiError {
109-
fn cause(&self) -> Option<&Fail> {
109+
fn cause(&self) -> Option<&dyn Fail> {
110110
self.inner.cause()
111111
}
112112

lambda-runtime-core/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl Error for RuntimeError {
7777
&self.msg
7878
}
7979

80-
fn cause(&self) -> Option<&Error> {
80+
fn cause(&self) -> Option<&dyn Error> {
8181
// Generic error, underlying cause isn't tracked.
8282
None
8383
}

lambda-runtime-errors-derive/tests/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ enum FailureErrorKind {
2323
}
2424

2525
impl Fail for FailureCustomWithKind {
26-
fn cause(&self) -> Option<&Fail> {
26+
fn cause(&self) -> Option<&dyn Fail> {
2727
self.inner.cause()
2828
}
2929

0 commit comments

Comments
 (0)