Skip to content

build: use go-version-file instead of hardcoded Go version in CI #1473

build: use go-version-file instead of hardcoded Go version in CI

build: use go-version-file instead of hardcoded Go version in CI #1473

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
elasticsearch:
image: elasticsearch:8.17.1
ports:
- 9200:9200
env:
discovery.type: single-node
xpack.security.enabled: "false"
ES_JAVA_OPTS: "-Xms128m -Xmx128m"
env:
ES_TEST_SERVER_URL: "http://localhost:9200"
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Install dependencies
run: sudo apt-get install build-essential
- name: Install packages
run: go mod tidy
- name: Run Test
run: make test
- name: Install goveralls and send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go install github.com/mattn/goveralls@latest
goveralls -coverprofile=coverage.out -service=github