Skip to content

Merge pull request #5 from antosubash/claude/sleepy-mahavira #22

Merge pull request #5 from antosubash/claude/sleepy-mahavira

Merge pull request #5 from antosubash/claude/sleepy-mahavira #22

Workflow file for this run

name: CI
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: Download Tailwind CSS
run: bash tools/download-tailwind.sh
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore
test-sqlite:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Download Tailwind CSS
run: bash tools/download-tailwind.sh
- name: Test
run: dotnet test --verbosity normal
test-postgresql:
runs-on: ubuntu-latest
needs: build
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: simplemodule_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--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: Download Tailwind CSS
run: bash tools/download-tailwind.sh
- name: Test with PostgreSQL
run: dotnet test --verbosity normal
env:
Database__DefaultConnection: "Host=localhost;Database=simplemodule_test;Username=test;Password=test"
- name: Verify migrations are up-to-date
working-directory: template/SimpleModule.Host
env:
Database__DefaultConnection: "Host=localhost;Database=simplemodule_test;Username=test;Password=test"
run: dotnet ef migrations has-pending-model-changes
publish:
runs-on: ubuntu-latest
needs: [test-sqlite, test-postgresql]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Download Tailwind CSS
run: bash tools/download-tailwind.sh
- name: Publish
run: dotnet publish template/SimpleModule.Host/SimpleModule.Host.csproj -c Release