Skip to content

Commit 1f6b045

Browse files
authored
Add typos, clippy, and fmt (#29)
1 parent 600f0b5 commit 1f6b045

File tree

5 files changed

+86
-46
lines changed

5 files changed

+86
-46
lines changed

.github/workflows/check.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 15
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- run: rustup update stable
19+
- run: rustup default stable
20+
21+
- uses: Swatinem/rust-cache@v2
22+
with:
23+
prefix-key: 'test'
24+
25+
- uses: actions/cache@v4
26+
with:
27+
path: ~/.cache/typst
28+
key: typst
29+
30+
- uses: FedericoCarboni/setup-ffmpeg@v3
31+
32+
- uses: taiki-e/install-action@v2
33+
with:
34+
tool: typst-cli
35+
36+
- run: |
37+
echo "DEEPINFRA_KEY=${{ secrets.DEEPINFRA_KEY }}" > keys.env
38+
echo "GOOGLE_KEY=${{ secrets.GOOGLE_KEY }}" >> keys.env
39+
echo "OPENAI_KEY=${{ secrets.OPENAI_KEY }}" >> keys.env
40+
41+
- run: cargo test --all-features
42+
43+
- name: Cleanup before Post Run
44+
run: rm keys.env
45+
46+
typos:
47+
runs-on: ubuntu-22.04
48+
if: github.event_name == 'pull_request'
49+
timeout-minutes: 10
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- uses: crate-ci/typos@master
55+
with:
56+
files: '.'
57+
58+
fmt:
59+
runs-on: ubuntu-22.04
60+
if: github.event_name == 'pull_request'
61+
timeout-minutes: 10
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
- run: rustup update stable
66+
- run: rustup default stable
67+
- run: rustup component add rustfmt
68+
- run: cargo fmt --all --check
69+
70+
clippy:
71+
runs-on: ubuntu-22.04
72+
if: github.event_name == 'pull_request'
73+
timeout-minutes: 10
74+
75+
steps:
76+
- uses: actions/checkout@v4
77+
- run: rustup update stable
78+
- run: rustup default stable
79+
- uses: Swatinem/rust-cache@v2
80+
with:
81+
prefix-key: 'clippy'
82+
- run: cargo clippy --all --all-features -- -D warnings

.github/workflows/test.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ So in practice, the Kokoro model is probably the better option for now.
181181

182182
## Portrait Video
183183

184-
To create a portait video, like a YouTube Short, you can set the page to
184+
To create a portrait video, like a YouTube Short, you can set the page to
185185

186186
```typ
187187
#set page(width: 259.2pt, height: 460.8pt)

_typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[default.extend-words]
2+
typ = "typ"

tests/test_duration_matches.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#toolbox.pdfpc.speaker-note("
2828
To install OpenAI whisper, there are multiple options.
2929
30-
OpenAI advices to use pip install, but on MacOS it's probably easier to use Homebrew.
30+
OpenAI advises to use pip install, but on MacOS it's probably easier to use Homebrew.
3131
3232
Note that this installation might take a while.
3333

0 commit comments

Comments
 (0)