diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index c139107..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -version: 2 -jobs: - build: - docker: - # specify the version - - image: circleci/golang:1.18 - - steps: - - checkout - - # run tests and report coverage - - run: go test -v -cover -race -coverprofile=coverage.txt ./... - - run: bash <(curl -s https://codecov.io/bash) - - # build binary - - run: go install github.com/digineo/go-dhclient/cmd/dhclient diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..86cbf10 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,28 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: [push] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./... + + - uses: codecov/codecov-action@v2 + with: + file: coverage.out diff --git a/README.md b/README.md index 0bd160f..de558b8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ go-dhclient =========== -[![CircleCI](https://circleci.com/gh/digineo/go-dhclient/tree/master.svg?style=shield)](https://circleci.com/gh/digineo/go-dhclient/tree/master) +[![Build](https://github.com/digineo/go-dhclient/actions/workflows/go.yml/badge.svg)](https://github.com/digineo/go-dhclient/actions/workflows/go.yml) [![Codecov](http://codecov.io/github/digineo/go-dhclient/coverage.svg?branch=master)](http://codecov.io/github/digineo/go-dhclient?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/digineo/go-dhclient)](https://goreportcard.com/report/github.com/digineo/go-dhclient)