Skip to content

test

test #146

Workflow file for this run

name: "CI: Build and Test"
on:
push:
branches: [main, feat/github-actions-pipeline]
paths:
- "**.cs"
- "**.cshtml"
- "**.tsx"
- "**.js"
- "**.json"
- "**.csproj"
- "**.props"
- "**.targets"
- "**.sln"
- "**.yml"
pull_request:
branches: [main]
paths:
- "**.cs"
- "**.cshtml"
- "**.tsx"
- "**.js"
- "**.json"
- "**.csproj"
- "**.props"
- "**.targets"
- "**.sln"
jobs:
build:
runs-on: ubuntu-latest
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
SA_PASSWORD: "Your_password123"
ACCEPT_EULA: "Y"
ports:
- 1433:1433
options: >-
--health-cmd "exit 0"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
# - name: Install sqlcmd
# run: |
# sudo apt-get update
# sudo ACCEPT_EULA=y apt-get install -y mssql-tools unixodbc-dev
# echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
# source ~/.bashrc
# - name: Wait for SQL Server to be ready
# run: |
# for i in {1..30}; do
# if /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "SELECT 1" &> /dev/null; then
# echo "SQL Server is up and running"
# break
# fi
# echo "Waiting for SQL Server to be ready..."
# sleep 2
# done
# - name: Print SQL Server name
# run: |
# /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "SELECT @@SERVERNAME"
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Install dependencies
run: |
dotnet restore `
--locked-mode
- name: Build Solution
run: |
dotnet build `
--configuration Release `
--no-restore
####### The only tests present are now Playwright NUnit tests,
####### which aren't properly integrated into this pipeline
# - name: Test Solution
# run: |
# dotnet test `
# --configuration Release `
# --no-build `
# --no-restore