Skip to content

api/rest: add messages REST server and tests #24

api/rest: add messages REST server and tests

api/rest: add messages REST server and tests #24

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- name: Download dependencies
run: go mod download
- name: Verify formatting (gofmt)
shell: bash
run: |
files=$(find . -name '*.go' -not -path './.local/*')
out=$(gofmt -l $files)
if [ -n "$out" ]; then
echo "The following files are not gofmt-formatted:"
echo "$out"
exit 1
fi
- name: Vet
run: go vet ./...
- name: Test
run: go test ./... -count=1 -race -coverprofile=coverage.out -covermode=atomic
- name: Build
run: go build ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.out
flags: unittests
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}