diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..30381cb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Use cache + uses: actions/cache@v3 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download Modules + if: steps.cache.outputs.cache-hit != 'true' + run: go mod download + + - name: Build + run: | + go build -o gohakai ./... + rm gohakai diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e44cfd..85d6492 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,15 +11,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Unshallow run: git fetch --prune --unshallow - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dd2aadc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: go -sudo: false - -matrix: - include: - - go: 1.9 - - go: "1.13" - - go: tip - -install: - - make update-module - - go get -u -v golang.org/x/tools/cmd/goimports - -before_script: - - goimports -d . - - gofmt -l . - -script: - - go build -v . - -notifications: - email: false diff --git a/README.md b/README.md index 33f244a..c75c55c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -## gohakai - -[![Travis Build Status](https://travis-ci.org/KLab/gohakai.svg?branch=master)](https://travis-ci.org/KLab/gohakai) +## gohakai [![CI](https://github.com/KLab/gohakai/actions/workflows/ci.yml/badge.svg)](https://github.com/KLab/gohakai/actions/workflows/ci.yml) Internet hakai with Go. diff --git a/go.mod b/go.mod index 8f9fb66..fcd1b07 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( golang.org/x/crypto v0.14.0 golang.org/x/net v0.17.0 - gopkg.in/yaml.v2 v2.2.8 + gopkg.in/yaml.v2 v2.4.0 ) require ( diff --git a/go.sum b/go.sum index c25327b..ac4953f 100644 --- a/go.sum +++ b/go.sum @@ -9,5 +9,5 @@ golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=