Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
Updated github actions workflows and added lint command to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfrei committed Feb 18, 2021
1 parent 6f29f7c commit a71fa1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,19 @@ jobs:
go get -u golang.org/x/lint/golint
- name: Build
run: go build .
run: make build

- name: Code Style
run: |
go vet .
golint .
run: make lint

- name: Test PR
if: github.ref != 'refs/heads/master'
run: go test -v ./...
run: make test

- name: Test Master
if: github.ref == 'refs/heads/master'
env:
UPCLOUD_API_USER: ${{ secrets.UPCLOUD_API_USER }}
UPCLOUD_API_PASSWORD: ${{ secrets.UPCLOUD_API_PASSWORD }}
PACKER_ACC: 1
run: go test -count 1 -v ./... -timeout=30m
run: make test_integration
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ test:
test_integration:
PACKER_ACC=1 go test -count 1 -v ./... -timeout=120m

lint:
go vet .
golint .

build:
go build -v

install: build
mkdir -p ~/.packer.d/plugins
install ./upcloud-packer ~/.packer.d/plugins/packer-builder-upcloud

.PHONY: default test test_integration build install
.PHONY: default test test_integration lint build install

0 comments on commit a71fa1f

Please sign in to comment.