diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..0eec5ca --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,21 @@ +version: 2.1 +jobs: + build: + working_directory: ~/repo + docker: + - image: cimg/go:1.21.0 + steps: + - checkout + - restore_cache: + keys: + - go-mod-v4-{{ checksum "go.sum" }} + - run: + name: Install Dependencies + command: go get ./... + - save_cache: + key: go-mod-v4-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" + - run: + name: Run tests + command: make test \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..22951d4 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,17 @@ +name: Go +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.21.x' + - name: Install dependencies + run: go get ./... + - name: Run tests + run: make test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f4e5392..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: go - -go: - - 1.19.x - - 1.20.x - - 1.21.x - - master - -before_install: - - make deps - -script: - - make test - -after_success: - - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/README.md b/README.md index 04bc30a..2ddb6e4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # dog.ceo golang lambda functions -[![Build Status](https://travis-ci.org/ElliottLandsborough/dog-ceo-api-golang.svg?branch=master)](https://travis-ci.org/ElliottLandsborough/dog-ceo-api-golang) +[![CircleCI](https://dl.circleci.com/status-badge/img/circleci/AE794oGvVf6X3TA8Q3K9s/bYUpPd4Cc9ATboVrnJhRf/tree/main.svg?style=svg&circle-token=f466b05680041172041bf3f65dd74246cdbb49d1)](https://dl.circleci.com/status-badge/redirect/circleci/AE794oGvVf6X3TA8Q3K9s/bYUpPd4Cc9ATboVrnJhRf/tree/main) [![codecov](https://codecov.io/gh/ElliottLandsborough/dog-ceo-api-golang/branch/master/graph/badge.svg)](https://codecov.io/gh/ElliottLandsborough/dog-ceo-api-golang) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Go](https://img.shields.io/badge/Go-1.x-success.svg)](https://golang.org/)