add first github action #2
Workflow file for this run
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: 'go test and go build' | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup golang environment | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.19' | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Run go test | |
run: make test | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup golang environment | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.19' | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Make sure app can build | |
run: make build | |