Skip to content

Commit

Permalink
Finalise (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricHripko authored Feb 21, 2021
1 parent fa2ebed commit f9d5273
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 54 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on: push

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15

- name: Build
run: go build -v ./...

- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.37

- name: Package
uses: docker/build-push-action@v2
with:
push: false
tags: erichripko/pack.yaml
context: .
file: pack.yaml

- name: Install test runner
run: curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.6.2/gotestsum_1.6.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum

- name: Test
run: gotestsum --junitfile unit-tests.xml -- -v -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: unit-tests.xml

- name: Upload coverage
uses: codecov/codecov-action@v1

- name: Login to DockerHub
if: github.ref == 'ref/heads/master' && success()
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Release
if: github.ref == 'ref/heads/master' && success()
uses: docker/build-push-action@v2
with:
push: true
tags: erichripko/pack.yaml
context: .
file: pack.yaml
26 changes: 0 additions & 26 deletions .github/workflows/release.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/verify.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@

# Dependency directories (remove the comment below to include it)
vendor/

# Test results
unit-tests.xml
coverage.txt

0 comments on commit f9d5273

Please sign in to comment.