aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/go.yml
blob: b40874ea989ce3b58743946cf454f91229c52149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Go

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:

  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    
    - name: Set up Go
      uses: actions/setup-go@v4
      with:
        go-version: '1.22'

    - name: cache deno.land dependencies
      uses: actions/cache@v2
      with:
        key: ${{ runner.os }}-deno-${{ hashFiles('**/*') }}
        restore-keys: ${{ runner.os }}-deno-
        path: |
          /home/runner/.cache/deno
    
    - run: |
        curl -L -o dhall-linux.tar.bz2 https://github.com/dhall-lang/dhall-haskell/releases/download/1.42.0/dhall-json-1.7.12-x86_64-linux.tar.bz2
        tar -xvjf dhall-linux.tar.bz2
        mv bin/* /usr/local/bin
    
    - uses: denoland/setup-deno@v1
      with:
        deno-version: v1.x

    - uses: typst-community/setup-typst@v3

    - name: Build
      run: go build -v ./...

    - name: Test
      run: go test -v ./...