You've already forked AstralRinth
forked from didirus/AstralRinth
Move rust checks to own file
This commit is contained in:
35
.github/workflows/rust-ci.yml
vendored
Normal file
35
.github/workflows/rust-ci.yml
vendored
Normal 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
|
||||||
20
.github/workflows/security.yml
vendored
20
.github/workflows/security.yml
vendored
@@ -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 }}
|
|
||||||
@@ -10,7 +10,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build, Test, and Lint
|
name: Build, Test, and Lint (Turbo)
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -66,8 +66,5 @@ jobs:
|
|||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm lint
|
run: pnpm lint
|
||||||
|
|
||||||
- name: Start Docker Compose
|
|
||||||
run: docker compose up -d
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@modrinth/app-playground",
|
|
||||||
"scripts": {
|
|
||||||
"build": "cargo build --release",
|
|
||||||
"lint": "cargo fmt --check && cargo clippy -- -D warnings",
|
|
||||||
"fix": "cargo fmt && cargo clippy --fix",
|
|
||||||
"dev": "cargo run",
|
|
||||||
"test": "cargo test"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,10 +3,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tauri build",
|
"build": "tauri build",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
"dev": "tauri dev",
|
"dev": "tauri dev"
|
||||||
"test": "cargo test",
|
|
||||||
"lint": "cargo fmt --check && cargo clippy -- -D warnings",
|
|
||||||
"fix": "cargo fmt && cargo clippy --fix"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "2.0.0-rc.16"
|
"@tauri-apps/cli": "2.0.0-rc.16"
|
||||||
|
|||||||
@@ -120,11 +120,5 @@ json-patch = "*"
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-http = "3.4.0"
|
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]
|
[features]
|
||||||
jemalloc = ["jemallocator"]
|
jemalloc = ["jemallocator"]
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@modrinth/labrinth",
|
|
||||||
"scripts": {
|
|
||||||
"build": "cargo build",
|
|
||||||
"dev": "cargo run",
|
|
||||||
"test": "cargo test",
|
|
||||||
"lint": "cargo fmt --check && cargo clippy -- -D warnings",
|
|
||||||
"fix": "cargo fmt && cargo clippy --fix"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -290,7 +290,7 @@ pub async fn edit_subscription(
|
|||||||
intent.setup_future_usage = Some(PaymentIntentSetupFutureUsage::OffSession);
|
intent.setup_future_usage = Some(PaymentIntentSetupFutureUsage::OffSession);
|
||||||
|
|
||||||
if let Some(payment_method) = &edit_subscription.payment_method {
|
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
|
id
|
||||||
} else {
|
} else {
|
||||||
return Err(ApiError::InvalidInput(
|
return Err(ApiError::InvalidInput(
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@modrinth/app-lib",
|
|
||||||
"scripts": {
|
|
||||||
"build": "cargo build --release",
|
|
||||||
"lint": "cargo fmt --check && cargo clippy -- -D warnings",
|
|
||||||
"fix": "cargo fmt && cargo clippy --fix",
|
|
||||||
"test": "cargo test"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user