Skip to content

Flow execute over network #217

Flow execute over network

Flow execute over network #217

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
run-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'
- name: Examples
run: |
set -e # Exit on any error
for file in examples/*.go; do
if [[ "$file" == "examples/setup.go" ]]; then
continue
fi
echo "Running $file"
go run "$file" examples/setup.go
echo "----------------------"
echo
done
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'
- name: build
run: |
rm -rf examples/
go build -v ./...
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd "pg_isready -U user -d testdb"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'
- name: Test
run: |
until pg_isready -h 127.0.0.1 -p 5432 -U user; do
echo "Waiting for Postgres...";
sleep 3;
done
rm -rf examples/
GOEXPERIMENT=synctest GODEBUG=asynctimerchan=0 go test -v ./...