Skip to content

Commit

Permalink
workflow for test build in pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bollos00 committed Dec 14, 2021
1 parent 5ba1fca commit 5334a47
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

# Credits https://gist.github.com/thatisuday/b3b6096457e64cdfa20796315ed29fbd

name: Build

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-linux:
name: Build the application in Linux environment
runs-on: ubuntu-latest
steps:

# step 1: set up go
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13

# step 2: checkout repository code
- name: Checkout code into workspace directory
uses: actions/checkout@v2

# step 3: install dependencies
- name: Install all Go dependencies
run: go get

# step 4: run the application
- name: go run
run: go run ./main.go -l 30

0 comments on commit 5334a47

Please sign in to comment.