Skip to content

Commit

Permalink
Move rust checks to own file
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Oct 18, 2024
1 parent 1b73d24 commit c143929
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 66 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 0 additions & 20 deletions .github/workflows/security.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/ci.yml → .github/workflows/turbo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
name: Build, Test, and Lint
name: Build, Test, and Lint (Turbo)
runs-on: ubuntu-22.04

steps:
Expand Down Expand Up @@ -66,8 +66,5 @@ jobs:
- name: Lint
run: pnpm lint

- name: Start Docker Compose
run: docker compose up -d

- name: Test
run: pnpm test
10 changes: 0 additions & 10 deletions apps/app-playground/package.json

This file was deleted.

5 changes: 1 addition & 4 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
"scripts": {
"build": "tauri build",
"tauri": "tauri",
"dev": "tauri dev",
"test": "cargo test",
"lint": "cargo fmt --check && cargo clippy -- -D warnings",
"fix": "cargo fmt && cargo clippy --fix"
"dev": "tauri dev"
},
"devDependencies": {
"@tauri-apps/cli": "2.0.0-rc.16"
Expand Down
6 changes: 0 additions & 6 deletions apps/labrinth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,5 @@ json-patch = "*"
[dev-dependencies]
actix-http = "3.4.0"

[profile.dev]
opt-level = 0 # Minimal optimization, speeds up compilation
lto = false # Disables Link Time Optimization
incremental = true # Enables incremental compilation
codegen-units = 16 # Higher number can improve compile times but reduce runtime performance

[features]
jemalloc = ["jemallocator"]
12 changes: 0 additions & 12 deletions apps/labrinth/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion apps/labrinth/src/routes/internal/billing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ pub async fn edit_subscription(
intent.setup_future_usage = Some(PaymentIntentSetupFutureUsage::OffSession);

if let Some(payment_method) = &edit_subscription.payment_method {
let payment_method_id = if let Ok(id) = PaymentMethodId::from_str(&payment_method) {
let payment_method_id = if let Ok(id) = PaymentMethodId::from_str(payment_method) {
id
} else {
return Err(ApiError::InvalidInput(
Expand Down
9 changes: 0 additions & 9 deletions packages/app-lib/package.json

This file was deleted.

0 comments on commit c143929

Please sign in to comment.