Bump NUnit.Analyzers from 4.0.1 to 4.1.0 #274
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: Build, test and package | |
on: push | |
env: | |
MSSQL_SA_PASSWORD: "YourStrong!Passw0rd" | |
ACCEPT_EULA: "Y" | |
MSSQL_PID: "developer" | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
jobs: | |
package: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: HicServices/RDMP | |
ref: develop | |
path: RDMP | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 7.0.x | |
- name: Get version | |
id: version | |
shell: cmd | |
run: | | |
getversions >> %GITHUB_OUTPUT% | |
- name: Install MS SQL 2019 Express LocalDB | |
uses: crazy-max/ghaction-chocolatey@v3 | |
with: | |
args: install -r sqllocaldb --no-progress | |
- name: Install python2 | |
uses: crazy-max/ghaction-chocolatey@v3 | |
with: | |
args: install -r python2 | |
- name: Populate Databases.yaml | |
shell: bash | |
run: | | |
find ./RDMP/Tools/rdmp/Databases.yaml -type f -exec sed -i 's/RDMP_/TEST_/g' {} \; | |
# - name: Initialise LocalDB | |
# shell: bash | |
# run: | | |
# SqlLocalDB.exe create MSSQLLocalDB -s | |
# sqlcmd -l 180 -S '(localdb)\MSSQLLocalDB' -Q "SELECT @@VERSION;" | |
# sed -i'' -e 's/localhost/\(localdb\)\\MSSQLLocalDB/' RDMP/Tests.Common/TestDatabases.txt | |
- name: Install a SQL Server suite of tools | |
uses: potatoqualitee/[email protected] | |
with: | |
install: sqlengine, sqlclient, sqlpackage, localdb | |
- name: Run sqlclient | |
run: sqlcmd -S localhost -U sa -P dbatools.I0 -d tempdb -Q "SELECT @@version;" | |
- uses: shogo82148/actions-setup-mysql@v1 | |
with: | |
mysql-version: '8.0' | |
root-password: 'YourStrong!Passw0rd' | |
auto-start: true | |
- name: Set up database | |
run: | | |
dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- install --createdatabasetimeout 1800 localhost TEST_ -e | |
- name: Test | |
run: | | |
dotnet test | |
- name: Build | |
run: | | |
@" | |
<?xml version="1.0" encoding="utf-8"?> | |
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> | |
<metadata> | |
<id>HIC.Extensions</id> | |
<version>${{ steps.version.outputs.version }}</version> | |
<authors>Health Informatics Service, University of Dundee</authors> | |
<description>Imaging plugin for Research Data Management Platform </description> | |
<dependencies> | |
<dependency id="HIC.RDMP.Plugin" version="${{ steps.version.outputs.rdmpversion }}" /> | |
</dependencies> | |
</metadata> | |
</package> | |
"@ | Out-File -Encoding ASCII plugin.nuspec | |
dotnet publish -p:DebugType=embedded -p:GenerateDocumentation=false Plugin/windows/windows.csproj -c Release -o p/windows | |
dotnet publish -p:DebugType=embedded -p:GenerateDocumentation=false Plugin/main/main.csproj -c Release -o p/main | |
rm p/windows/windows.dll | |
rm p/main/main.dll | |
cmd /c 7z a -tzip HIC.Rdmp.Extensions.Plugin.${{ steps.version.outputs.version }}.nupkg plugin.nuspec p | |
dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.Extensions.Plugin.${{ steps.version.outputs.version }}.nupkg --dir yaml | |
dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- cmd listsupportedcommands --dir yaml | |
- name: Store created nupkg files | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./*.nupkg | |
retention-days: 1 | |
- name: Upload release binaries | |
if: contains(github.ref,'refs/tags/') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: 'HIC.Rdmp.Extensions.Plugin.${{ steps.version.outputs.version }}.nupkg' |