Skip to content

Commit

Permalink
Re-organize the repository
Browse files Browse the repository at this point in the history
  • Loading branch information
ivancorrales committed Mar 1, 2022
1 parent 7fd5fa2 commit 16ead79
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 55 deletions.
48 changes: 27 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,53 @@ jobs:
uses: hadolint/hadolint-action@v1.6.0
with:
dockerfile: Dockerfile
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Clean repository
run: make clean install
- name: Run unit tests
run: make test
- name: Upload coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage.*
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2.1.0
with:
file: ./coverage.out
flags: ${{ runner.os }}
ci:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, macos-10.15, windows-2019 ]
runs-on: ${{ matrix.os }}
needs: [linters]
needs:
- linters
- tests
- release-test
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Build
run: make ci
- name: Upload coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage.*
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2.1.0
with:
file: ./coverage.out
flags: ${{ runner.os }}

release-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Release test
run: make build
run: make clean mod-tidy install build
26 changes: 0 additions & 26 deletions .github/workflows/lint.yml

This file was deleted.

10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,14 @@ mod-tidy: ## go mod tidy
go mod tidy
cd tools && go mod tidy

.PHONY: diff
diff: ## git diff
$(call print-target)
git diff --exit-code
RES=$$(git status --porcelain) ; if [ -n "$$RES" ]; then echo $$RES && exit 1 ; fi

.PHONY: build
build: ## goreleaser --snapshot --skip-publish --rm-dist
build:
build: install
$(call print-target)
goreleaser --snapshot --skip-publish --rm-dist

.PHONY: release
release: ## goreleaser --rm-dist
release:
release: install
$(call print-target)
goreleaser --rm-dist
Expand Down

0 comments on commit 16ead79

Please sign in to comment.