Skip to content

Commit e335ab9

Browse files
committed
Add a typst-package-check step to CI
1 parent a00c798 commit e335ab9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/test_pr.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,25 @@ jobs:
4949

5050
- name: Test packaging
5151
run: bundler/target/release/bundler
52+
53+
lint:
54+
name: Lint
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Count how many commits need to be fetched
58+
id: base-depth
59+
run: echo "base-depth=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_OUTPUT
60+
- uses: actions/checkout@v4
61+
with:
62+
fetch-depth: ${{ steps.base-depth.outputs.base-depth }}
63+
- name: Fetch necessary Git objects
64+
run: |
65+
merge_sha=$(/usr/bin/git log -1 --format=%H)
66+
git fetch origin ${{ github.base_ref }}
67+
git checkout ${{ github.base_ref }}
68+
git checkout $merge_sha
69+
- uses: typst/[email protected]
70+
with:
71+
installation-id: ${{ secrets.GH_INSTALLATION_ID }}
72+
app-id: ${{ secrets.GH_APP_ID }}
73+
private-key: ${{ secrets.GH_PRIVATE_KEY }}

0 commit comments

Comments
 (0)