Skip to content
name: Run unit & integration tests against Golang RC version
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: RC version check
runs-on: ubuntu-latest
# env:
# # COSMOS_CONNECTION_URL: ${{ secrets.COSMOS_CONNECTION_URL }}
# # COSMOS_KEY: ${{ secrets.COSMOS_KEY }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run coverage commands
shell: bash
run: |
#!/bin/bash
shopt -s expand_aliases
TRACER_PATH=$(pwd)
echo $TRACER_PATH
echo "Dealing with Golang RC version!"
rcToInstall=$(git ls-remote -t https://github.com/golang/go | awk -F/ '{ print $NF }' | sort -V |grep rc | tail -1 | tr -d ' ')
echo "RC version : $rcToInstall"
url="golang.org/dl/$rcToInstall@latest"
echo "RC URL : $url"
go install $url
ls ~/go
ls ~/go/bin
# which go1.23rc2
alias gorc="~/go/bin/$rcToInstall"
gorc download
gorc version
echo "Starting Couchbase"
docker compose -f docker-compose-integration.yaml up -d
echo "Starting Postgres"
sudo systemctl start postgresql.service
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'mysecretpassword'"
echo "After starting Postgres"
gorc test -v -coverpkg=./... -cover -covermode atomic ./...