Create rust.yml

This commit is contained in:
Ryan Leckey 2019-12-30 02:16:00 -08:00 committed by GitHub
parent 0acd0b0db7
commit a60d3d3aa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

38
.github/workflows/rust.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Rust
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Check
run: cargo check --all-features
- name: Build
run: cargo build --all-features
- name: Unit Test
run: cargo test -p sqlx-core --all-features