Debian Codegraph @

.github/workflows/test.yml

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 on:
2 push:
3 branches: [master]
4 pull_request:
5 name: Test
6 env:
7 GOPROXY: https://proxy.golang.org
8 GO111MODULE: on
9 SASS_VERSION: 1.80.3
10 DART_SASS_SHA_LINUX: 7c933edbad0a7d389192c5b79393485c088bd2c4398e32f5754c32af006a9ffd
11 DART_SASS_SHA_MACOS: 79e060b0e131c3bb3c16926bafc371dc33feab122bfa8c01aa337a072097967b
12 DART_SASS_SHA_WINDOWS: 0bc4708b37cd1bac4740e83ac5e3176e66b774f77fd5dd364da5b5cfc9bfb469
13 permissions:
14 contents: read
15 jobs:
16 test:
17 strategy:
18 matrix:
19 go-version: [1.26.x]
20 os: [ubuntu-latest, windows-latest]
21 runs-on: ${{ matrix.os }}
22 steps:
23 - if: matrix.os == 'ubuntu-latest'
24 name: Free Disk Space (Ubuntu)
25 uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
26 with:
27 tool-cache: true
28 android: true
29 dotnet: true
30 haskell: true
31 large-packages: true
32 docker-images: true
33 swap-storage: true
34 - name: Checkout code
35 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36 - name: Install Go
37 uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
38 with:
39 go-version: ${{ matrix.go-version }}
40 check-latest: true
41 cache: true
42 - name: Install Node
43 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
44 with:
45 node-version: "22"
46 - name: Install Ruby
47 uses: ruby/setup-ruby@7372622e62b60b3cb750dcd2b9e32c247ffec26a # v1.302.0
48 with:
49 ruby-version: "3.4.5"
50 - name: Install Ruby gems
51 run: |
52 gem install asciidoctor -v "2.0.26"
53 gem install asciidoctor-diagram -v "3.1.0"
54 gem install asciidoctor-html5s -v "0.5.1"
55 - name: Install GoAT
56 run: go install github.com/blampe/goat/cmd/goat@177de93b192b8ffae608e5d9ec421cc99bf68402
57 - name: Install Python
58 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
59 with:
60 python-version: "3.x"
61 - name: Install Mage
62 run: go install github.com/magefile/[email protected]
63 - name: Install gotmplfmt
64 run: go install github.com/gohugoio/gotmplfmt@latest
65 - name: Install docutils
66 run: |
67 pip install docutils Pygments
68 rst2html --version
69 - if: matrix.os == 'ubuntu-latest'
70 name: Install pandoc on Linux
71 run: |
72 sudo apt-get update -y
73 sudo apt-get install -y pandoc
74 - if: matrix.os == 'macos-latest'
75 run: |
76 brew install pandoc
77 - if: matrix.os == 'windows-latest'
78 run: |
79 choco install pandoc
80 - run: pandoc -v
81 - if: matrix.os == 'windows-latest'
82 run: |
83 choco install mingw
84 - if: matrix.os == 'ubuntu-latest'
85 name: Install dart-sass Linux
86 run: |
87 echo "Install Dart Sass version ${SASS_VERSION} ..."
88 curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-linux-x64.tar.gz";
89 echo "${DART_SASS_SHA_LINUX} dart-sass-${SASS_VERSION}-linux-x64.tar.gz" | sha256sum -c;
90 tar -xvf "dart-sass-${SASS_VERSION}-linux-x64.tar.gz";
91 echo "$GOBIN"
92 echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH
93 - if: matrix.os == 'macos-latest'
94 name: Install dart-sass MacOS
95 run: |
96 echo "Install Dart Sass version ${SASS_VERSION} ..."
97 curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-macos-x64.tar.gz";
98 echo "${DART_SASS_SHA_MACOS} dart-sass-${SASS_VERSION}-macos-x64.tar.gz" | shasum -a 256 -c;
99 tar -xvf "dart-sass-${SASS_VERSION}-macos-x64.tar.gz";
100 echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH
101 - if: matrix.os == 'windows-latest'
102 name: Install dart-sass Windows
103 run: |
104 echo "Install Dart Sass version ${env:SASS_VERSION} ..."
105 curl -LJO "https://github.com/sass/dart-sass/releases/download/${env:SASS_VERSION}/dart-sass-${env:SASS_VERSION}-windows-x64.zip";
106 Expand-Archive -Path "dart-sass-${env:SASS_VERSION}-windows-x64.zip" -DestinationPath .;
107 echo "$env:GITHUB_WORKSPACE/dart-sass/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
108 - if: matrix.os == 'ubuntu-latest'
109 name: Install staticcheck
110 run: go install honnef.co/go/tools/cmd/staticcheck@latest
111 - if: matrix.os == 'ubuntu-latest'
112 name: Check embedded go template formatting
113 run: "diff <(gotmplfmt -d tpl/tplimpl/embedded/templates) <(printf '')"
114 - if: matrix.os == 'ubuntu-latest'
115 name: Run staticcheck
116 run: |
117 export STATICCHECK_CACHE="${{ runner.temp }}/staticcheck"
118 staticcheck ./...
119 rm -rf ${{ runner.temp }}/staticcheck
120 - if: matrix.os != 'windows-latest'
121 name: Check
122 run: |
123 sass --version;
124 mage -v check;
125 env:
126 HUGO_BUILD_TAGS: extended,withdeploy
127 - if: matrix.os == 'windows-latest'
128 # See issue #11052. We limit the build to regular test (no -race flag) on Windows for now.
129 name: Test
130 run: |
131 mage -v test
132 env:
133 HUGO_BUILD_TAGS: extended,withdeploy
134 - if: matrix.os == 'ubuntu-latest'
135 name: Build for dragonfly
136 run: |
137 go install
138 go clean -i -cache
139 env:
140 GOARCH: amd64
141 GOOS: dragonfly