Skip to content

Commit 1cc9d94

Browse files
committed
Add GH action for CI
Copied from rust-analyzer.
1 parent 398e160 commit 1cc9d94

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This is copied from https://github.com/rust-analyzer/rust-analyzer/blob/master/.github/workflows/ci.yaml
2+
name: CI
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- ci-test
9+
10+
env:
11+
CARGO_INCREMENTAL: 0
12+
CARGO_NET_RETRY: 10
13+
CI: 1
14+
RUST_BACKTRACE: short
15+
RUSTUP_MAX_RETRIES: 10
16+
17+
jobs:
18+
rust:
19+
name: Rust
20+
runs-on: ${{ matrix.os }}
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os: [ubuntu-latest]
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v2
30+
with:
31+
ref: ${{ github.event.pull_request.head.sha }}
32+
fetch-depth: 20
33+
34+
- name: Install Rust toolchain
35+
uses: actions-rs/toolchain@v1
36+
with:
37+
toolchain: stable
38+
profile: minimal
39+
override: true
40+
components: rustfmt, rust-src
41+
42+
- name: Cache Dependencies
43+
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
44+
45+
- name: Compile
46+
run: cargo test --no-run --locked
47+
48+
- name: Test
49+
run: cargo test -- --nocapture --quiet

0 commit comments

Comments
 (0)