mirror of
https://github.com/Dadido3/go-typst.git
synced 2025-11-20 19:54:14 +00:00
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
name: test
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
test-non-docker:
|
|
name: test non-docker
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go-version: ['1.23.x']
|
|
typst-version: ['0.12.0', '0.13.0', '0.13.1', '0.14.0']
|
|
|
|
steps:
|
|
- name: Install typst-cli ${{ matrix.typst-version }} from crates.io
|
|
uses: baptiste0928/cargo-install@v3
|
|
with:
|
|
crate: typst-cli
|
|
version: '${{ matrix.typst-version }}'
|
|
|
|
- name: Set up Go ${{ matrix.go-version }}
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Test package
|
|
run: go test -skip "^TestDocker.*$" -v ./...
|
|
|
|
test-docker:
|
|
name: test docker
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go-version: ['1.23.x']
|
|
typst-docker-image:
|
|
- 'ghcr.io/typst/typst:v0.12.0'
|
|
- 'ghcr.io/typst/typst:v0.13.0'
|
|
- 'ghcr.io/typst/typst:v0.13.1'
|
|
- 'ghcr.io/typst/typst:0.14.0'
|
|
- '' # Also include the default image, just in case.
|
|
|
|
steps:
|
|
- name: Set up Go ${{ matrix.go-version }}
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Test package
|
|
run: go test -run "^TestDocker.*$" -v ./...
|
|
env:
|
|
TYPST_DOCKER_IMAGE: ${{ matrix.typst-docker-image }}
|