chore: add workflow to run tests
This commit is contained in:
@@ -1,48 +0,0 @@
|
|||||||
name: Compile manual
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- "**"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ci:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: catthehacker/ubuntu:act-latest
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: "3.2"
|
|
||||||
|
|
||||||
- name: Setup Fontist
|
|
||||||
uses: fontist/setup-fontist@v2
|
|
||||||
|
|
||||||
- name: Install Fonts
|
|
||||||
run: fontist manifest install docs/fonts.yaml
|
|
||||||
|
|
||||||
- uses: typst-community/setup-typst@v5
|
|
||||||
with:
|
|
||||||
typst-version: "0.15.0"
|
|
||||||
zip-packages: docs/requirements.json
|
|
||||||
cache-local-packages: true
|
|
||||||
token: ""
|
|
||||||
|
|
||||||
- run: |
|
|
||||||
typst compile \
|
|
||||||
--root . \
|
|
||||||
--font-path ~/.fontist/fonts \
|
|
||||||
--input hash=${{ gitea.sha }} \
|
|
||||||
docs/manual.typ \
|
|
||||||
docs/manual.pdf
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: christopherhx/gitea-upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: manual
|
|
||||||
path: docs/manual.pdf
|
|
||||||
24
.gitea/workflows/tests.yaml
Normal file
24
.gitea/workflows/tests.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version-file: pyproject.toml
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||||
|
- run: python3 -m tests
|
||||||
Reference in New Issue
Block a user