diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..5939b0b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,28 @@ +name: ci + +on: + pull_request: + branches: [master] + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.21' + + - name: Echo Go Version + run: go version + + - name: Run go fmt + run: go fmt + + - name: Check if all unit tests are passing + run: go test ./... -cover diff --git a/README.md b/README.md index c3976e4..7c91c5e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![code coverage badge](https://github.com/luka2220/memcached-cli-client/actions/workflows/ci.yaml/badge.svg) + ## Description This project aims to create a cli client that can interact with the Memcached server. The client will send commands based on the memcached TCP communication protocol.