diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..3815f78 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,82 @@ +name: check + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - uses: actions/checkout@v4 + + - run: rustup update stable + - run: rustup default stable + + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: 'test' + + - uses: actions/cache@v4 + with: + path: ~/.cache/typst + key: typst + + - uses: FedericoCarboni/setup-ffmpeg@v3 + + - uses: taiki-e/install-action@v2 + with: + tool: typst-cli + + - run: | + echo "DEEPINFRA_KEY=${{ secrets.DEEPINFRA_KEY }}" > keys.env + echo "GOOGLE_KEY=${{ secrets.GOOGLE_KEY }}" >> keys.env + echo "OPENAI_KEY=${{ secrets.OPENAI_KEY }}" >> keys.env + + - run: cargo test --all-features + + - name: Cleanup before Post Run + run: rm keys.env + + typos: + runs-on: ubuntu-22.04 + if: github.event_name == 'pull_request' + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + + - uses: crate-ci/typos@master + with: + files: '.' + + fmt: + runs-on: ubuntu-22.04 + if: github.event_name == 'pull_request' + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + - run: rustup update stable + - run: rustup default stable + - run: rustup component add rustfmt + - run: cargo fmt --all --check + + clippy: + runs-on: ubuntu-22.04 + if: github.event_name == 'pull_request' + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + - run: rustup update stable + - run: rustup default stable + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: 'clippy' + - run: cargo clippy --all --all-features -- -D warnings \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 99bd6c2..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: test - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 15 - - steps: - - uses: actions/checkout@v4 - - - run: rustup update stable - - run: rustup default stable - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: 'test' - - - uses: actions/cache@v4 - with: - path: ~/.cache/typst - key: typst - - - uses: FedericoCarboni/setup-ffmpeg@v3 - - - uses: taiki-e/install-action@v2 - with: - tool: typst-cli - - - run: | - echo "DEEPINFRA_KEY=${{ secrets.DEEPINFRA_KEY }}" > keys.env - echo "GOOGLE_KEY=${{ secrets.GOOGLE_KEY }}" >> keys.env - echo "OPENAI_KEY=${{ secrets.OPENAI_KEY }}" >> keys.env - - - run: cargo test --all-features - - - name: Cleanup before Post Run - run: rm keys.env diff --git a/README.md b/README.md index d934ccc..af05e94 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ So in practice, the Kokoro model is probably the better option for now. ## Portrait Video -To create a portait video, like a YouTube Short, you can set the page to +To create a portrait video, like a YouTube Short, you can set the page to ```typ #set page(width: 259.2pt, height: 460.8pt) diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000..674555e --- /dev/null +++ b/_typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +typ = "typ" \ No newline at end of file diff --git a/tests/test_duration_matches.typ b/tests/test_duration_matches.typ index f8635ed..aef6a10 100644 --- a/tests/test_duration_matches.typ +++ b/tests/test_duration_matches.typ @@ -27,7 +27,7 @@ #toolbox.pdfpc.speaker-note(" To install OpenAI whisper, there are multiple options. - OpenAI advices to use pip install, but on MacOS it's probably easier to use Homebrew. + OpenAI advises to use pip install, but on MacOS it's probably easier to use Homebrew. Note that this installation might take a while.