Files
install-go/.gitea/workflows/test.yaml
jake f452a8f09b
All checks were successful
tests / test-gomod (push) Successful in 25s
tests / test-versioninput (push) Successful in 30s
[ci] finishing new test
- properly checking go command version on second test
2026-05-27 14:42:51 -04:00

53 lines
1.3 KiB
YAML

name: "tests"
run-name: "tests"
on: push
jobs:
test-gomod:
runs-on: wind
steps:
- uses: actions/checkout@v4
- name: "setup mock go.mod file"
shell: bash
run: |
echo -e "module code.jakeyoungdev.com/actions/install-go\n\ngo 1.24" > go.mod
- name: "run go install script"
shell: bash
env:
GO_INSTALL_COMMANDS: code.jakeyoungdev.com/jake/mctl@v0.3.4
GO_INSTALL_ARCH: amd64
run: |
chmod +x install.sh
./install.sh
- name: "check go version"
shell: bash
run: go version | grep "go version go1.24.0 linux/amd64"
- name: "check go installed command"
shell: bash
run: mctl -v | grep "mctl version v0.3.4"
test-versioninput:
runs-on: wind
steps:
- uses: actions/checkout@v4
- name: "install go with version input"
shell: bash
env:
GO_INSTALL_COMMANDS: code.jakeyoungdev.com/jake/mctl@v0.3.4
GO_INSTALL_VERSION: 1.23.2
GO_INSTALL_ARCH: amd64
run: |
chmod +x install.sh
./install.sh
- name: "check go version"
shell: bash
run: go version | grep "go version go1.23.2 linux/amd64"
- name: "check go installed command"
shell: bash
run: mctl -v | grep "mctl version v0.3.4"