Skip to content

Commit

Permalink
Update go version to 1.19, move to github actions (#8)
Browse files Browse the repository at this point in the history
* update go version to 1.19, move to github actions

* remove old snap login file

* give goveralls step a name

* test release step

* use docker access token from secrets

* remove skip validation flag

* remove test values again
  • Loading branch information
atomicptr authored Dec 28, 2022
1 parent d787ab1 commit f31c8ef
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 332 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
on:
push:
tags:
- '*'
branches:
- master
pull_request:
types:
- opened
- synchronize

permissions:
contents: write

jobs:
tests:
name: CI Tests & Release
runs-on: ubuntu-latest
environment: CI
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '^1.19'
- name: Install Dependencies
run: |
go install github.com/mattn/goveralls@latest
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1
- name: Build & Test
run: |
make build
go test -v -covermode=count -coverprofile=coverage.out ./...
$(go env GOPATH)/bin/golangci-lint run ./...
- name: Goveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
with:
snapcraft_token: ${{ secrets.SNAPCRAFT_TOKEN }}
if: github.tag != ''
- name: Release Prep
run: |
git checkout -- go.mod go.sum
docker login -u=atomicptr -p="$DOCKER_ACCESS_TOKEN"
env:
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
if: github.tag != ''
- name: Release
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.tag != ''
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ snapcrafts:
base: core18
apps:
crab:
command: crab
plugs: ["network"]
## Homebrew
brews:
Expand Down
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# crab
[![Travis CI](https://api.travis-ci.com/atomicptr/crab.svg?branch=master)](https://travis-ci.com/atomicptr/crab)
[![Go Report Card](https://goreportcard.com/badge/github.com/atomicptr/crab)](https://goreportcard.com/report/github.com/atomicptr/crab)
[![Coverage Status](https://coveralls.io/repos/github/atomicptr/crab/badge.svg?branch=master)](https://coveralls.io/github/atomicptr/crab?branch=master)

Expand Down
11 changes: 5 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
module github.com/atomicptr/crab

go 1.18
go 1.19

require (
github.com/beevik/etree v1.1.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.1
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.8.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.1.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit f31c8ef

Please sign in to comment.