mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 08:17:40 +03:00
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
on: [pull_request]
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
test:
|
|
name: fmt, clippy, test, test --release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install LLVM
|
|
run: sudo ./ci/install-llvm.sh 8
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
name: Install Rust Toolchain
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- run: rustup component add rustfmt
|
|
|
|
- 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') }}
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
name: cargo fmt --check
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
- run: rustup component add clippy
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
name: cargo clippy
|
|
with:
|
|
command: clippy
|
|
args: -- -D warnings
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
name: cargo test
|
|
with:
|
|
command: test
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
name: cargo test --release
|
|
with:
|
|
command: test
|
|
args: --release
|