Skip to content

Restructure

Restructure #21

Workflow file for this run

name: Build
on:
push:
branches:
- master
- staging
- develop
pull_request:
branches:
- master
- staging
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.18.3' # The Go version to download (if necessary) and use.
# - name: Install dependencies
# run: |
# go version
# go get -u golang.org/x/lint/golint
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.52.2
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
# Run build of the application
- name: Run build
run: make build
# Run testing on the code
- name: Run testing
run: make test
#
#
# # The "deploy" workflow
# deploy:
# # The type of runner that the job will run on
# runs-on: ubuntu-latest
# needs: [build] # Only run this workflow when "build" workflow succeeds
# if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }} # Only run this workflow if it is master branch on push event
# steps:
# - uses: actions/checkout@v2
#
# # Deploy to Docker registry
# - name: Deploy to Docker registry
# uses: docker/build-push-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# repository: wilsontanwm/gosimple
# tag_with_ref: true