Move rust checks to own file

This commit is contained in:
Jai A
2024-10-18 15:43:30 -07:00
parent 1b73d248b3
commit c143929b69
9 changed files with 38 additions and 66 deletions

35
.github/workflows/rust-ci.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: CI
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]
merge_group:
types: [ checks_requested ]
env:
CARGO_TERM_COLOR: always
SQLX_OFFLINE: true
jobs:
build:
name: Build and Lint (Rust)
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Get build cache
id: cache-build
uses: actions/cache@v2
with:
path: target/**
key: ${{ runner.os }}-rust-cache
- name: Build
run: cargo build
- name: Lint
run: cargo clippy --all-targets --all-features -- -D warnings

View File

@@ -1,20 +0,0 @@
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
pull_request:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -10,7 +10,7 @@ on:
jobs:
build:
name: Build, Test, and Lint
name: Build, Test, and Lint (Turbo)
runs-on: ubuntu-22.04
steps:
@@ -66,8 +66,5 @@ jobs:
- name: Lint
run: pnpm lint
- name: Start Docker Compose
run: docker compose up -d
- name: Test
run: pnpm test