Commit Graph

165 Commits (d39bc14c43d9190c52779128f696c8ee27fb63e4)

Author SHA1 Message Date
Nutomic d39bc14c43
Add some more clippy lints (#2586)
* Add some more clippy lints

* restore config

* no allow dirty

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Nutomic c3c4508a72
Use release docker image for nightly build (#2583)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Felix Ableitner 4ddca46228 Revert "Test drone (#2582)"
This reverts commit 87c7ee5490.
1 year ago
Nutomic 87c7ee5490
Test drone (#2582) 1 year ago
Nutomic 6f3bf4634b
Various pedantic clippy fixes (#2568)
* Various pedantic clippy fixes

* more clippy pedantic fixes

* try to fix ci

* add fix clippy script, use rust 1.65

* fix clippy
1 year ago
Nutomic df7809fbbb
Specify dependencies and metadata for entire workspace (#2565)
* Specify dependencies and metadata for entire workspace (fixes #2474)

* building api_common shouldnt depend on diesel

* remove drone task

* try with quotes

* fix clippy

* more clippy
2 years ago
Dessalines 5d837780f5
Add diesel_async, get rid of blocking function (#2510)
* Moving settings to Database.

- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.

* Fix weird clippy issue.

* Removing extra lines.

* Some fixes from suggestions.

* Fixing apub tests.

* Using instance creation helper function.

* Move forms to their own line.

* Trying to fix local_site_data, still broken.

* Testing out async

* Testing out async 2

* Fixing federation tests.

* Trying to fix check features 1.

* Starting on adding diesel async. 1/4th done.

* Added async to views and schema.

* Adding some more async

* Compiling now.

* Added diesel async. Fixes #2465

* Running clippy --fix

* Trying to fix cargo test on drone.

* Trying new muslrust.

* Trying a custom dns

* Trying a custom dns 2

* Trying a custom dns 3

* Trying a custom dns 4

* Trying a custom dns 5

* Trying a custom dns 6

* Trying a custom dns 7

* Addressing PR comments.

* Adding check_apub to all verify functions.

* Reverting back drone.

* Fixing merge

* Fix docker images.

* Adding missing discussion_languages.

* Trying to fix federation tests.

* Fix site setup user creation.

* Fix clippy

* Fix clippy 2

* Test api faster

* Try to fix 1

* Try to fix 2

* What are these lines about

* Trying to fix 3

* Moving federation test back to top.

* Remove logging cat.
2 years ago
Nutomic 04f0f3af0b
Update clippy to use Rust 1.64 (#2498) 2 years ago
Dessalines c9f1407429
Diesel 2.0.0 upgrade (#2452)
* Initial commit to bump diesel to 2.0.0-rc.0 and see what happens

* Add chrono feature from diesel

* db_schema crate is close to building?

* Upgrade diesel-derive-newtype

* Mostly modifying references to connections to be mutable ones; also used
new way to do migrations as suggested by the migration guide; a lot more
compiles now, though I can't figure out this tricky ToSql issue at the
moment

* Running clippy --fix

* Trying to fix drone clippy 1

* Fix clippy

* Upgrade clux-musl

* Trying to fix drone clippy 2

* Trying to fix drone clippy 3

* Trying to fix drone clippy 5

* Adding diesel table aliases, removing sql view hack. Fixes #2101

Co-authored-by: Steven Chu <stevenc1@gmail.com>
Co-authored-by: Nutomic <me@nutomic.com>
2 years ago
Nutomic 8a4d9cc1ba
Use typed-builder crate for queries (#2379)
* Use typed-builder crate for PrivateMessageQuery

* derive builder for all queries

* remove unnecessary clones

* fix tests
2 years ago
Dessalines 9c3efe32e7
First pass at adding comment trees. (#2362)
* First pass at adding comment trees.

- Extracted comment replies into its own table.
- Added ltree column to comment
- Added parent_id param to GetComments to fetch a tree branch
- No paging / limiting yet

* Adding child_count to comment_aggregates.

* Adding parent comment update counts

* Fix unit tests.

* Comment tree paging mostly done.

* Fix clippy

* Fix drone tests wrong postgres version.

* Fix unit tests.

* Add back in delete in unit test.

* Add postgres upgrade script.

* Fixing some PR comments.

* Move update ltree into Comment::create

* Updating based on comments.

* Fix send soft fail.
2 years ago
Nutomic ddc9763050
Fix wrong clippy warning in ci (#2339) 2 years ago
Nutomic 587a0de8f7
Specify minimum Rust version 1.57 (fixes #2333) (#2334)
* Specify minimum Rust version 1.57 (fixes #2333)

* use latest rust for clippy

* use rust 1.60 for clippy

* no add component

* use official rust docker

* comments
2 years ago
Dessalines 916c53ccec
Move different features drone check to below defaults.hjson check. (#2296) 2 years ago
Nutomic 9a458d2e4b
Run cargo check for each crate with different features (ref #2284) (#2292) 2 years ago
Nutomic 60e9586530
Add drone task for nightly build (#2264) 2 years ago
Felix Ableitner 26d5b38115 Fix CI failures 2 years ago
Felix Ableitner 80684de7da Make opentelemetry dependency optional 2 years ago
Nutomic 99f3141841
Update to Rust 1.60 (#2247) 2 years ago
Nutomic 3aa3d75a1e
Add cargo feature for building lemmy_api_common with mininum deps (#2243) 2 years ago
Dessalines 2e65b31aa6
Fix arm submodule (#2174) 2 years ago
Nutomic cb44b14717
WIP: Email localization (fixes #500) (#2053)
* Allow email localization (fixes #500)

* add PersonAggregates::default()

* add lemmy-translations submodule

* fix gitmodules
2 years ago
Dessalines ad76c75821
Trying to add docker:latest. Fixes #1959 (#1960)
* Trying to add docker:latest. Fixes #1959

* Version 0.14.4-rc.3

* Trying to fix clippy on crate build

* Version 0.14.4-rc.4
2 years ago
Dessalines 3bd827c73a
Temporarily disable arm tests (#1895)
* Temporarily disable arm tests

* Disable cargo build
3 years ago
Dessalines 5b3be5c102 Updating rust musl images 3 years ago
Dessalines 44b5fe0631
Stop using lemmy-ui:dev images (#1880)
* Stop using lemmy-ui:dev images

* Dont publish dev docker images with drone.
3 years ago
Nutomic 7bfe59a89f
Format config/defaults.hjson before committing (#1860) 3 years ago
Dessalines 23731cd49c
Trying out rust-musl-builder for cargo publish (#1856)
* Trying out rust-musl-builder for cargo publish

* Version 0.13.5-rc.1

* Try rust:nightly

* Version 0.13.5-rc.2

* Try rust slim

* Version 0.13.5-rc.3

* Try rust 1.51

* Version 0.13.5-rc.4

* Trying another nightly

* Version 0.13.5-rc.5

* Trying another fix

* Version 0.13.5-rc.6
3 years ago
Nutomic 21304e6751
Create a custom pre-commit hook, generates config/defaults.hjson (#1857)
* Create a custom pre-commit hook, generates config/defaults.hjson (fixes #1836)

* invalid defaults file

* Revert "invalid defaults file"

This reverts commit 76d2c303e2.
3 years ago
Dessalines c28c1b4bb3
Trying to fix arm builds. (#1761)
* Trying to fix arm builds.

* Adding comment
3 years ago
Dessalines af225a42d0
Fix prod deploy script and clippy (#1724)
* Updating lemmy-js-client.

* Fix prod deploy script and clippy

* Try using buster.

* Using more generic and updated images.

* again.

* again.

* Try alternate env

* again.

* again.

* Version 0.11.4-rc.24

* again.

* Better old_tag

* Version 0.11.4-rc.27

* Updating cargo.lock

* Trying to run a cargo check to update the lock

* Version 0.11.4-rc.28
3 years ago
Felix Ableitner a44b5c9c36 publish to crates.io with normal release script 3 years ago
Dessalines f67b0e9ff8
Updating to rust 1.51.0 (#1598) 3 years ago
Nutomic dc1a0dcd5e
Fetch git tags manually in CI (#1590)
* Fetch git tags manually in CI

* Dont need espeak in CI anymore
3 years ago
Nutomic b8a6592369
Drone release main (ref #1556) (#1557)
* publish docker images from main

* try with separate step

* redo, lots of boilerplate

* try to fix syntax

* unique step names

* fix docker tags, remove cargo-chef

* only build dev image on main branch

* use `ref` for condition, as `branch` uses the target branch for PRs

* consistent indents

* fix tag

* use lemmy-ui:dev image for `docker/dev` and `docker/federation`
3 years ago
Nutomic 74a63804dc
Fix test failure due to config loading error (#1547)
* Crash if config fails to load

* fix previous commit

* Fix test failure due to config loading error

* Adding test fix to drone.

* Logging line.

* Trying to fix drone 2

* Fixing deploy script.

Co-authored-by: Dessalines <tyhou13@gmx.com>
3 years ago
Dessalines ae635c752a Try to remove cargo home changing to fix release. 3 years ago
Dessalines c88722983e Merge branch 'main' into split_user_table 3 years ago
Nutomic 33a326854a
Set CARGO_HOME for CI so deps arent redownloaded (#1497)
* Set CARGO_HOME for CI so deps arent redownloaded

* run find on x86

* fix path

* cleanup

* try again

* use mv
3 years ago
Dessalines 7d04f371a5 fixing tests 3 3 years ago
Felix Ableitner 7f56281c26 Forbid usage of unwrap 3 years ago
Felix Ableitner 66946117e1 Upgrade Rust version 3 years ago
Andrew Yoon 600ae662a5 Support plain `cargo test` and disable unused doctests for speed
Since DB tests execute diesel migrations automatically, concurrent
execution causes flaky failures from simultaneous migrations. This can
be worked around using `cargo test --workspace -- --test-threads=1`,
which is what the CI config does, but this is not intuitive for
newcomer developers and unnecessarily slows down the test suite for
the majority of tests which are safe to run concurrently. This fixes
this issue by integrating with the small test crate `serial_test` and
using it to explicitly mark DB tests to run sequentially while
allowing all other tests to run in parallel.

Additionally, this greatly improves the speed of `cargo test` by
disabling doc-tests in all crates, since these are aren't currently
used and cargo's doc-test pass, even when no doc-tests exist, has
significant overhead. On my machine, this change significantly
improves test suite times by about 85%, making it much more practical
to develop with tools like `cargo watch` auto-running tests.
3 years ago
Dessalines d5d99fa3b9
Moving docs to join.lemmy.ml . Fixes #1396 (#1410)
* Moving docs to join.lemmy.ml . Fixes #1396

* Removing submodule fetch from drone.
3 years ago
Dessalines 97617d699d
Docker manifest arm amd64 deploy (#1367)
* A first try at docker manifest. 1.

* Fixing api version location

* Version 0.9.0-rc.13

* Test docker.

* Test docker 2.

* Test docker 3.

* Test docker 4.

* Test docker 5.

* Test docker 6.

* Test docker 7.

* Test docker 8.

* Test docker 9.

* Test docker 10.

* Test docker 11.

* Test docker 12.

* Version 0.9.0-rc.14

* Test docker 13.

* Test docker 14.

* Version 0.9.0-rc.15

* Test docker 15.

* Version 0.9.0-rc.16

* Test docker 16.

* Version 0.9.0-rc.17
3 years ago
Dessalines 672d4507b2 Removing check documentation build from drone, now that's in lemmy-docs. 3 years ago
Dessalines 8cfee9ca7d Trying to fix arm build. 3 years ago
Dessalines f0d928a433 Removing tag generation from drone. 3 years ago
Felix Ableitner f06b71d961 Add drone CI for arm 3 years ago
Dessalines d54be4ed7f Trying autotag 3 years ago