summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r--.github/workflows/ci.yaml42
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..bd48ee9
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,42 @@
+name: Cargo Build & Test
+
+on:
+ push:
+ pull_request:
+
+
+env:
+ CARGO_TERM_COLOR: always
+
+
+jobs:
+ test:
+ name: Rust project - latest
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Install toolchain
+ run: |
+ rustup update stable
+ rustup default stable
+ rustup component add clippy
+
+ - name: Lint
+ run: |
+ cd racer-tracer
+ cargo fmt -- --check
+ cargo clippy -- -D warnings
+
+ - name: Test
+ run: |
+ cd racer-tracer
+ cargo check
+ cargo test --all
+
+ - name: Build
+ run: |
+ cd racer-tracer
+ cargo build --release
+