[Release] General Golang Related Maintenance - August 2024 #207
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- development | |
- production | |
pull_request: | |
branches: | |
- development | |
- production | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_ACTIONS_CI: true | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v3 | |
# - name: Start Cassandra | |
# run: docker-compose up -d | |
# | |
# - name: Wait for healthy Cassandra | |
# uses: stringbean/docker-healthcheck-action@v1 | |
# with: | |
# container: cassandra | |
# wait-time: 50 | |
# require-status: running | |
# require-healthy: true | |
- name: Set up Go 1.22 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
cache: true | |
id: go | |
- name: Cache Go Modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Unit Test | |
run: make test_short | |
# - name: Shutdown Cassandra | |
# if: always() | |
# run: docker-compose down |