mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Rust
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Cache rust
|
|
id: cache_rust
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.rustup/toolchains
|
|
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- 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: Setup rust
|
|
uses: actions-rs/toolchain@v1
|
|
if: steps.cache_rust.outputs.cache-hit != 'true'
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- run: cargo check --all-features
|
|
|
|
- run: cargo test -p sqlx-core --all-features
|