Skip to content

Update holster, Golang to 1.22. #29

Update holster, Golang to 1.22.

Update holster, Golang to 1.22. #29

Workflow file for this run

name: Run tests
on:
pull_request:
branches: [ master, main ]
push:
branches: [ master, main ]
env:
KAFKA_PEERS: 127.0.0.1:9092
ZOOKEEPER_PEERS: 127.0.0.1:2181
KAFKA_HOSTNAME: 127.0.0.1
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PKG_WRITER_PAT }}
- name: Cache deps
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install deps
run: go mod download
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 kafka" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 zookeeper" | sudo tee -a /etc/hosts
- name: Start containers
run: docker-compose up -d
- name: Create test topics
run: .github/create_topics.sh
- name: Run tests
run: make test
- name: Stop containers
if: always()
run: docker-compose down