Add note about IDE #93
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [ push, pull_request ] | |
env: | |
FACIL_FORCE_REGENERATE: 1 | |
FACIL_FAIL_ON_CHANGED_OUTPUT: 1 | |
connectionString: Data Source=localhost;Database=FacilTest;User ID=sa;Password=CXTxgxnkzcTcLMCwKjqi4XbKgwFtw;TrustServerCertificate=True | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
- name: Restore tools | |
run: dotnet tool restore | |
- name: Check code format | |
run: dotnet fantomas --check . | |
- name: Install SQL Server | |
run: | | |
docker run -d -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=CXTxgxnkzcTcLMCwKjqi4XbKgwFtw' -e 'MSSQL_COLLATION=SQL_Latin1_General_CP1_CI_AS' --name sql -p 1433:1433 samuelmarks/mssql-server-fts-sqlpackage-linux | |
sleep 10s | |
docker ps -a | |
docker logs -t sql | |
- name: Build DB | |
run: dotnet build src/TestDb/TestDb.sqlproj -c Release | |
- name: Publish DB | |
run: dotnet sqlpackage /Action:Publish /SourceFile:"src/TestDb/bin/Release/TestDb.dacpac" /TargetConnectionString:"$connectionString" | |
- name: Build generator | |
run: dotnet build src/Facil.Generator -c Release | |
- name: Build package project | |
run: dotnet build src/Facil.Package -c Release | |
# Pack in a separate step (fails for some reason with "empty lib/" error if using <GeneratePackageOnBuild>) | |
- name: Pack | |
run: dotnet pack src/Facil.Package -c Release | |
# Build tests, which due to nuget.config should restore the locally built package | |
- name: Build tests | |
run: dotnet build src/DbTests -c Release | |
- name: Test | |
run: dotnet src/DbTests/bin/Release/net7.0/DbTests.dll --fail-on-focused-tests | |
- name: Push | |
if: startsWith(github.ref, 'refs/tags/v/') | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
run: dotnet nuget push "**/Facil*.nupkg" -s "https://api.nuget.org/v3/index.json" -k "$NUGET_API_KEY" --skip-duplicate |