Skip to content

Commit a6435f1

Browse files
GuillaumeGomezsyphar
authored andcommitted
Replace docker-compose calls with docker compose
1 parent 13c9409 commit a6435f1

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
run: |
4747
cp .env.sample .env
4848
mkdir -p ${DOCSRS_PREFIX}/public-html
49-
docker-compose up -d db
49+
docker compose up -d db
5050
# Give the database enough time to start up
5151
sleep 5
5252
# Make sure the database is actually working
@@ -69,7 +69,7 @@ jobs:
6969
--target-version 0
7070
7171
- name: Clean up the database
72-
run: docker-compose down --volumes
72+
run: docker compose down --volumes
7373

7474
test:
7575
env:
@@ -94,7 +94,7 @@ jobs:
9494
run: |
9595
cp .env.sample .env
9696
mkdir -p ${DOCSRS_PREFIX}/public-html
97-
docker-compose up -d db s3
97+
docker compose up -d db s3
9898
# Give the database enough time to start up
9999
sleep 5
100100
# Make sure the database is actually working
@@ -111,7 +111,7 @@ jobs:
111111
cargo test --locked -- --ignored --test-threads=1
112112
113113
- name: Clean up the database
114-
run: docker-compose down --volumes
114+
run: docker compose down --volumes
115115

116116
GUI_test:
117117
runs-on: ubuntu-latest
@@ -131,7 +131,7 @@ jobs:
131131
run: |
132132
cp .env.sample .env
133133
mkdir -p ${DOCSRS_PREFIX}/public-html
134-
docker-compose up -d db s3
134+
docker compose up -d db s3
135135
# Give the database enough time to start up
136136
sleep 5
137137
# Make sure the database is actually working
@@ -141,7 +141,7 @@ jobs:
141141
run: ./dockerfiles/run-gui-tests.sh
142142

143143
- name: Clean up the database
144-
run: docker-compose down --volumes
144+
run: docker compose down --volumes
145145

146146
fmt:
147147
name: Rustfmt

dockerfiles/run-gui-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
set -e
44

55
# Just in case it's running, we stop the web server.
6-
docker-compose stop web
6+
docker compose stop web
77

8-
docker-compose up -d db s3
8+
docker compose up -d db s3
99

1010
# If we have a .env file, we need to temporarily move it so
1111
# it doesn't make sqlx fail compilation.
@@ -36,6 +36,6 @@ cargo run -- start-web-server &
3636
SERVER_PID=$!
3737

3838
# status="docker run . -v `pwd`:/build/out:ro gui_tests"
39-
docker-compose run gui_tests
39+
docker compose run gui_tests
4040
status=$?
4141
exit $status

src/web/page/templates.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,24 +216,24 @@ pub mod filters {
216216
Ok(unindented)
217217
}
218218

219-
pub fn fas(value: &str, fw: bool, spin: bool, extra: &str) -> rinja::Result<String> {
220-
IconType::Strong.render(value, fw, spin, extra)
219+
pub fn fas(value: &str, fw: bool, spin: bool, extra: &str) -> rinja::Result<Safe<String>> {
220+
IconType::Strong.render(value, fw, spin, extra).map(Safe)
221221
}
222222

223-
pub fn far(value: &str, fw: bool, spin: bool, extra: &str) -> rinja::Result<String> {
224-
IconType::Regular.render(value, fw, spin, extra)
223+
pub fn far(value: &str, fw: bool, spin: bool, extra: &str) -> rinja::Result<Safe<String>> {
224+
IconType::Regular.render(value, fw, spin, extra).map(Safe)
225225
}
226226

227-
pub fn fab(value: &str, fw: bool, spin: bool, extra: &str) -> rinja::Result<String> {
228-
IconType::Brand.render(value, fw, spin, extra)
227+
pub fn fab(value: &str, fw: bool, spin: bool, extra: &str) -> rinja::Result<Safe<String>> {
228+
IconType::Brand.render(value, fw, spin, extra).map(Safe)
229229
}
230230

231-
pub fn highlight(code: impl std::fmt::Display, lang: &str) -> rinja::Result<String> {
231+
pub fn highlight(code: impl std::fmt::Display, lang: &str) -> rinja::Result<Safe<String>> {
232232
let highlighted_code = crate::web::highlight::with_lang(Some(lang), &code.to_string());
233-
Ok(format!(
233+
Ok(Safe(format!(
234234
"<pre><code>{}</code></pre>",
235235
highlighted_code
236-
))
236+
)))
237237
}
238238

239239
pub fn slugify<T: AsRef<str>>(code: T) -> rinja::Result<String> {

0 commit comments

Comments
 (0)