Skip to content

initial commit

initial commit #1

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
test:
runs-on: ubuntu-latest
services:
postgres:
image: timescale/timescaledb:latest-pg17
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ttx_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:latest
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Test
env:
TTX__Infrastructure__ConnectionStrings__Postgres: "Server=localhost;Port=5432;Database=ttx_test;Username=postgres;Password=postgres;"
TTX__Infrastructure__ConnectionStrings__Redis: "localhost:6379"
TTX__Infrastructure__Events: "Redis"
TTX__Infrastructure__Data: "Postgres"
run: dotnet test --verbosity normal