mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-25 20:11:10 +00:00
change woodpecker
This commit is contained in:
parent
e8202a47d4
commit
a1a2bdab03
2 changed files with 4 additions and 79 deletions
|
@ -3,84 +3,6 @@ variables:
|
||||||
- &install_binstall "wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz && tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz && cp cargo-binstall /usr/local/cargo/bin"
|
- &install_binstall "wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz && tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz && cp cargo-binstall /usr/local/cargo/bin"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
cargo_fmt:
|
|
||||||
image: rustlang/rust:nightly
|
|
||||||
environment:
|
|
||||||
# store cargo data in repo folder so that it gets cached between steps
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- rustup component add rustfmt
|
|
||||||
- cargo +nightly fmt -- --check
|
|
||||||
|
|
||||||
leptos_fmt:
|
|
||||||
image: *rust_image
|
|
||||||
commands:
|
|
||||||
- *install_binstall
|
|
||||||
- cargo binstall -y leptosfmt
|
|
||||||
- leptosfmt -c .leptosfmt.toml --check src
|
|
||||||
|
|
||||||
toml_fmt:
|
|
||||||
image: tamasfe/taplo:0.8.1
|
|
||||||
commands:
|
|
||||||
- taplo format --check
|
|
||||||
|
|
||||||
check_config_defaults_updated:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- cargo run -- --print-config > config/defaults_current.toml
|
|
||||||
- diff config/defaults.toml config/defaults_current.toml
|
|
||||||
|
|
||||||
ignored_files:
|
|
||||||
image: alpine:3
|
|
||||||
commands:
|
|
||||||
- apk add git
|
|
||||||
- IGNORED=$(git ls-files --cached -i --exclude-standard)
|
|
||||||
- if [[ "$IGNORED" ]]; then echo "Ignored files present:\n$IGNORED\n"; exit 1; fi
|
|
||||||
|
|
||||||
check_diesel_schema:
|
|
||||||
image: willsquire/diesel-cli
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
DATABASE_URL: postgres://ibis:password@database:5432/ibis
|
|
||||||
commands:
|
|
||||||
- diesel migration run
|
|
||||||
- diesel print-schema --config-file=diesel.toml > tmp.schema
|
|
||||||
- diff tmp.schema src/backend/database/schema.rs
|
|
||||||
|
|
||||||
frontend_wasm_build:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- "rustup target add wasm32-unknown-unknown"
|
|
||||||
- "cargo check --target wasm32-unknown-unknown --features csr,hydrate --no-default-features"
|
|
||||||
|
|
||||||
cargo_clippy:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- rustup component add clippy
|
|
||||||
- cargo clippy --tests --all-targets --all-features
|
|
||||||
|
|
||||||
cargo_test:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
LEMMY_DATABASE_URL: postgres://ibis:password@database:5432/ibis
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- apt-get update
|
|
||||||
- apt-get install postgresql sudo -y --no-install-recommends --no-install-suggests
|
|
||||||
# dbinit (used by tests to create temp db) refuses to run as root so we need to setup another user
|
|
||||||
- adduser testuser
|
|
||||||
- cp /usr/local/rustup /home/testuser/.rustup -r
|
|
||||||
- chown testuser:testuser . -R
|
|
||||||
- chown testuser:testuser /home/testuser -R
|
|
||||||
- export PATH="/usr/lib/postgresql/15/bin:/usr/local/cargo/bin:$PATH"
|
|
||||||
- sudo -u testuser env "PATH=$PATH" cargo test --no-fail-fast
|
|
||||||
|
|
||||||
build_release:
|
build_release:
|
||||||
image: *rust_image
|
image: *rust_image
|
||||||
environment:
|
environment:
|
||||||
|
@ -91,7 +13,10 @@ steps:
|
||||||
- rustup target add wasm32-unknown-unknown
|
- rustup target add wasm32-unknown-unknown
|
||||||
- ./cargo-binstall -y trunk
|
- ./cargo-binstall -y trunk
|
||||||
- export PATH="$PATH:$(pwd)/.cargo_home/bin/"
|
- export PATH="$PATH:$(pwd)/.cargo_home/bin/"
|
||||||
|
- ls -lah assets
|
||||||
|
- ls -lah assets/dist
|
||||||
- ./scripts/build_release.sh
|
- ./scripts/build_release.sh
|
||||||
|
- ls -lah assets/dist
|
||||||
when:
|
when:
|
||||||
- event: tag
|
- event: tag
|
||||||
|
|
||||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1704,7 +1704,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ibis"
|
name = "ibis"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
|
Loading…
Reference in a new issue