Skip to content

GitHub actions #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Rust

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
rust:
- 1.31.0
- stable
- beta
# disable because github actions does not have ability to allow failure
# - nightly
target:
- ""
- x86_64-unknown-linux-musl
exclude:
- os: macOS-latest
target: x86_64-unknown-linux-musl
- os: ubuntu-latest
rust: 1.31.0
target: x86_64-unknown-linux-musl
- os: ubuntu-latest
rust: beta
target: x86_64-unknown-linux-musl
- os: macOS-latest
rust: 1.31.0
- os: macOS-latest
rust: beta
#- os: macOS-latest
# rust: nightly
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: cargo build --all --verbose
env:
RUST_BACKTRACE: 1
TARGET: ${{ matrix.target }}
- name: Run tests
run: cargo test --all --verbose
env:
RUST_BACKTRACE: 1
TARGET: ${{ matrix.target }}
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- id: component
uses: actions-rs/components-nightly@v1
with:
component: rustfmt
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ steps.component.outputs.toolchain }}
override: true
components: rustfmt
- name: Run fmt check
run: cargo fmt --all -- --check
1 change: 0 additions & 1 deletion lambda-http/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,5 +468,4 @@ mod tests {
Test { foo: HashMap::new() }
)
}

}
2 changes: 1 addition & 1 deletion lambda-runtime-client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub enum ApiErrorKind {
}

impl Fail for ApiError {
fn cause(&self) -> Option<&Fail> {
fn cause(&self) -> Option<&dyn Fail> {
self.inner.cause()
}

Expand Down
2 changes: 1 addition & 1 deletion lambda-runtime-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Error for RuntimeError {
&self.msg
}

fn cause(&self) -> Option<&Error> {
fn cause(&self) -> Option<&dyn Error> {
// Generic error, underlying cause isn't tracked.
None
}
Expand Down
2 changes: 1 addition & 1 deletion lambda-runtime-errors-derive/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enum FailureErrorKind {
}

impl Fail for FailureCustomWithKind {
fn cause(&self) -> Option<&Fail> {
fn cause(&self) -> Option<&dyn Fail> {
self.inner.cause()
}

Expand Down