diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..b0a5923f51 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: ci +on: + pull_request: + branches: [main] +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.23.0' + - name: Run unit tests + run: go test --cover ./... + style: + name: Style + 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.23.0' + - name: Format code + run: test -z $(go fmt ./...) diff --git a/README.md b/README.md index c2bec0368b..86e753e275 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +![code coverage badge](https://github.com/Kuuhakuu001/learn-cicd-starter/actions/workflows/ci.yml/badge.svg) # learn-cicd-starter (Notely) This repo contains the starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev).