Skip to content

Bump actions/setup-go from 5.0.2 to 5.1.0 #166

Bump actions/setup-go from 5.0.2 to 5.1.0

Bump actions/setup-go from 5.0.2 to 5.1.0 #166

Workflow file for this run

name: Go 🔷🐀🔷 Tests 🦂
on:
push:
branches-ignore:
- 'main'
paths:
- 'go/**'
- '!go/**.md'
- '!go/.vscode/**'
- '.github/workflows/go-*'
pull_request:
branches:
- 'main'
paths:
- 'go/**'
- '!go/**.md'
- '!go/.vscode/**'
- '.github/workflows/go-*'
schedule: # 9AM on the 15th
- cron: 0 22 14 1,2,3,10,11,12 * # AEDT Months
- cron: 0 23 14 4,5,6,7,8,9 * # AEST Months
workflow_call:
permissions: {}
defaults:
run:
shell: bash
working-directory: go
jobs:
quick-test:
name: Go 🔷🐀🔷 Quick Test 🦂
if: ${{ github.event_name == 'push' && !(github.event.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 🔷🐀🔷 Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.18'
- name: 🦂 Test
run: make test
full-test:
name: Go 🔷🐀🔷 Full Test 🦂
if: >-
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }}
runs-on: '${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
go-version: ['1.13', '1.14', '1.15', '1.16', '1.17', '1.18']
os: [ubuntu-latest, macOS-latest, windows-latest]
exclude:
- go-version: '1.13'
os: macOS-latest
- go-version: '1.14'
os: macOS-latest
- go-version: '1.15'
os: macOS-latest
include:
- go-version: '1.13'
os: macOS-12
- go-version: '1.14'
os: macOS-12
- go-version: '1.15'
os: macOS-12
steps:
- name: 🏁 Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 🔷🐀🔷 Set up Go ${{ matrix.version }}
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ matrix.go-version }}
- name: 🦂 Test
run: make test
codeql:
name: Go 🔷🐀🔷 CodeQL 🛡👨‍💻🛡
if: >-
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') }}
permissions:
actions: read
contents: read
security-events: write
uses: ./.github/workflows/github-codeql.yaml
with:
language: 'go'
format:
name: Go 🔷🐀🔷 Format 🚱➡🚰
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 🔷🐀🔷 Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.18'
- name: 🚱➡🚰 Format
run: make format
# Docs step is optional depending on language
docs:
name: Go 🔷🐀🔷 Docs 📄 Quick Test 🦂
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 🔷🐀🔷 Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.13'
- name: 📄 Docs
run: |
make godoc
make docs
git config --local user.email "actions@github.com"
git config --local user.name "Github Actions"
export SHORTSHA=$(git rev-parse --short HEAD)
git fetch origin gh-pages-go:gh-pages-go
git symbolic-ref HEAD refs/heads/gh-pages-go
cd .. && mv go/docs ../MERGE_TARGET
git rm -rf . && git clean -fxd && git reset
shopt -s dotglob && mkdir go && mv ../MERGE_TARGET/* go/ && rm go/main.go && rm go/.gitignore
git add .
git commit -m "Build based on $SHORTSHA" --allow-empty