-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathaction.yml
More file actions
39 lines (35 loc) · 1.19 KB
/
action.yml
File metadata and controls
39 lines (35 loc) · 1.19 KB
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
name: "Test common"
description: "Pre-test steps: Go install and optional Chromium install"
inputs:
go_version:
description: "Go version (eg 1.25.x) or gotip."
required: false
default: "1.25.x"
platform:
description: "matrix.platform value (used for windows/arm detection)."
required: true
runs:
using: "composite"
steps:
- name: Install Go
if: ${{ inputs.go_version != 'gotip' }}
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: ${{ inputs.go_version }}
check-latest: true
- name: Download and install Go tip
if: ${{ inputs.go_version == 'gotip' }}
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: ${{ inputs.platform }}
run: |
gh release download ${PLATFORM} --repo grafana/gotip --pattern 'go.zip'
unzip go.zip -d $HOME/sdk
- name: Install chromium
# This is only needed on arm images, chromium comes preinstalled on amd64 runner images.
if: ${{contains(inputs.platform, 'arm') }}
shell: bash
run: |
sudo apt update && sudo apt install chromium-browser
chromium --version || true