+5
-5
.github/workflows/api.yml
+5
-5
.github/workflows/api.yml
···
4
4
workflow_dispatch:
5
5
pull_request:
6
6
branches: [ main ]
7
-
paths: [ 'api/**' ]
7
+
paths: [ 'api/**', 'packages/lexicon-rs/**' ]
8
8
push:
9
9
branches: [ main ]
10
-
paths: [ 'api/**' ]
10
+
paths: [ 'api/**', 'packages/lexicon-rs/**' ]
11
11
12
12
jobs:
13
13
build:
···
69
69
-e HTTP_PORT=8080 \
70
70
-e DATABASE_URL=postgresql://slice:slice_test_password@host.docker.internal:5432/slice_test \
71
71
--add-host host.docker.internal:host-gateway \
72
-
slice:latest
72
+
slices:latest
73
73
74
74
# Wait for the service to start and show logs
75
75
echo "Waiting for service to start..."
···
108
108
docker rm slice-test postgres-test
109
109
110
110
- name: Save Docker image as artifact
111
-
run: docker save slice:latest | gzip > slice-image.tar.gz
111
+
run: docker save slices:latest | gzip > slice-image.tar.gz
112
112
113
113
- name: Upload Docker image artifact
114
114
uses: actions/upload-artifact@v4
···
139
139
run: docker load < slice-image.tar.gz
140
140
141
141
- name: Tag for Fly.io
142
-
run: docker tag slice:latest registry.fly.io/slices-api:latest
142
+
run: docker tag slices:latest registry.fly.io/slices-api:latest
143
143
144
144
- name: Setup Fly CLI
145
145
uses: superfly/flyctl-actions/setup-flyctl@master
+8
-3
api/Cargo.lock
+8
-3
api/Cargo.lock
···
2659
2659
2660
2660
[[package]]
2661
2661
name = "slices-lexicon"
2662
-
version = "0.1.3"
2663
-
source = "registry+https://github.com/rust-lang/crates.io-index"
2664
-
checksum = "b7324c3cd736ff0799b7bb47ffc6e45b476a0ec79c8fb99fdbeaac9cb91a7a31"
2662
+
version = "0.1.4"
2665
2663
dependencies = [
2666
2664
"chrono",
2667
2665
"regex",
2668
2666
"serde",
2669
2667
"serde_json",
2670
2668
"thiserror 2.0.14",
2669
+
"unicode-segmentation",
2671
2670
]
2672
2671
2673
2672
[[package]]
···
3415
3414
version = "0.1.3"
3416
3415
source = "registry+https://github.com/rust-lang/crates.io-index"
3417
3416
checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0"
3417
+
3418
+
[[package]]
3419
+
name = "unicode-segmentation"
3420
+
version = "1.12.0"
3421
+
source = "registry+https://github.com/rust-lang/crates.io-index"
3422
+
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
3418
3423
3419
3424
[[package]]
3420
3425
name = "unsigned-varint"
+1
-1
api/Cargo.toml
+1
-1
api/Cargo.toml
+7
-4
api/flake.nix
+7
-4
api/flake.nix
···
28
28
29
29
# Project source for crane
30
30
src = pkgs.lib.cleanSourceWith {
31
-
src = ./.;
31
+
src = ../.;
32
32
filter = path: type:
33
33
(craneLib.filterCargoSources path type) ||
34
34
(pkgs.lib.hasInfix "/migrations/" path) ||
···
36
36
(pkgs.lib.hasInfix "/.sqlx/" path) ||
37
37
(pkgs.lib.hasSuffix "/.sqlx" path) ||
38
38
(pkgs.lib.hasInfix "/scripts/" path) ||
39
-
(pkgs.lib.hasSuffix "/scripts" path);
39
+
(pkgs.lib.hasSuffix "/scripts" path) ||
40
+
(pkgs.lib.hasInfix "/packages/lexicon-rs/" path);
40
41
};
41
42
42
43
commonArgs = {
···
45
46
strictDeps = true;
46
47
pname = "slices";
47
48
name = "slices";
49
+
sourceRoot = "source/api";
50
+
cargoLock = ../api/Cargo.lock;
48
51
buildInputs = with pkgs; [
49
52
openssl
50
53
pkg-config
···
87
90
# Copy migration files
88
91
migrationFiles = pkgs.stdenv.mkDerivation {
89
92
name = "slices-migrations";
90
-
src = ./migrations;
93
+
src = ../api/migrations;
91
94
installPhase = ''
92
95
mkdir -p $out/migrations
93
96
cp -r * $out/migrations/
···
97
100
# Copy script files
98
101
scriptFiles = pkgs.stdenv.mkDerivation {
99
102
name = "slices-scripts";
100
-
src = ./scripts;
103
+
src = ../api/scripts;
101
104
installPhase = ''
102
105
mkdir -p $out/scripts
103
106
cp -r * $out/scripts/