mirror of
https://github.com/kennyp/asdf-golang.git
synced 2024-10-06 04:32:07 +08:00
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
name: CI
|
|
on:
|
|
# Triggers the workflow on push or pull request events but only for the master branch
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
plugin_test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- ubuntu-latest
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 🏗️ Create dummy install directories
|
|
run: |
|
|
./test-fixtures/create-dummy-installs.sh
|
|
|
|
- name: Test parsing 'go.mod'
|
|
run: |
|
|
bin/parse-legacy-file test-fixtures/go.mod | grep "^1.19.3"
|
|
- name: Test parsing '.go-version'
|
|
run: |
|
|
bin/parse-legacy-file test-fixtures/.go-version | grep "^1.17.13"
|
|
- name: Test plugin works to get latest version
|
|
uses: asdf-vm/actions/plugin-test@v1
|
|
with:
|
|
command: go version
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run ShellSpec
|
|
run: |
|
|
curl -fsSL https://git.io/shellspec | sh -s 0.28.1 -p ./tools -y
|
|
./tools/lib/shellspec/bin/shellspec
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run ShellCheck
|
|
run: shellcheck bin/*
|