26huitailang is testing out GitHub Actions 🚀 #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: yogo | |
env: | |
GOPROXY: https://goproxy.io,direct | |
GO111MODULE: "on" | |
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | |
on: [push] | |
jobs: | |
go-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: CA | |
run: | | |
env | |
apt update | |
apt-get install ca-certificates -y | |
update-ca-certificates | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
check-latest: true | |
cache-dependency-path: go.sum | |
- name: Go version | |
run: go version && env | |
- name: Build | |
run: go mod vendor && go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: binary file | |
path: | | |
yogo | |
config |