Bump Amazon.CDK.Lib and Constructs in /src #2264
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: | |
branches: | |
- master | |
- release-* | |
pull_request: | |
workflow_dispatch: | |
env: | |
DOTNET_NOLOGO: true | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
build: | |
name: ${{ matrix.name }}-${{ matrix.engine }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2022, ubuntu-22.04] | |
engine: [SqlServer, MySql, PostgreSql, Oracle] | |
include: | |
- os: windows-2022 | |
name: Windows | |
- os: ubuntu-22.04 | |
name: Linux | |
fail-fast: false | |
steps: | |
- name: Check for secrets | |
env: | |
SECRETS_AVAILABLE: ${{ secrets.SECRETS_AVAILABLE }} | |
run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 }) | |
- name: Checkout | |
uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4.1.0 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: dotnet build src --configuration Release -graph | |
- name: Upload packages | |
if: matrix.name == 'Windows' && matrix.engine == 'SqlServer' | |
uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: NuGet packages | |
path: nugets/ | |
retention-days: 7 | |
- name: Azure login | |
uses: azure/login@v2.2.0 | |
if: matrix.engine == 'PostgreSQL' || (matrix.engine == 'Oracle' && matrix.name == 'Windows') | |
with: | |
creds: ${{ secrets.AZURE_ACI_CREDENTIALS }} | |
- name: Setup SQL Server | |
if: matrix.engine == 'SqlServer' | |
uses: Particular/install-sql-server-action@v1.2.0 | |
with: | |
connection-string-env-var: SQLServerConnectionString | |
catalog: nservicebus | |
extra-params: "Encrypt=False;" | |
- name: Setup PostgreSql 15.x | |
if: matrix.engine == 'PostgreSql' | |
uses: Particular/setup-postgres-action@v1.0.2 | |
with: | |
connection-string-name: PostgreSqlConnectionString | |
tag: SqlPersistence | |
registry-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
registry-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Setup MySQL | |
id: setup-mysql | |
if: matrix.engine == 'MySql' | |
run: | | |
echo '[client] | |
user=root | |
host=localhost' >> mysql-login | |
if ($Env:RUNNER_OS -eq 'Windows') { | |
echo "Installing MySQL from Chocolatey" | |
choco install mysql --limitoutput | |
echo 'password=' >> mysql-login | |
} else { | |
echo "Starting MySQL service preinstalled on Linux agent" | |
sudo systemctl start mysql.service | |
echo 'password=root' >> mysql-login | |
} | |
for ($i = 0; $i -lt 30; $i++) { ## 2.5 minute timeout | |
echo "Checking for MySQL connectivity $($i+1)/30..." | |
$ignore = mysql --defaults-extra-file=mysql-login -e "show databases;" | |
if ($?) { | |
echo "Connection successful" | |
break; | |
} | |
sleep 5 | |
} | |
echo "Creating nservicebus database" | |
mysql --defaults-extra-file=mysql-login -D mysql -e "create database if not exists nservicebus ;" | |
echo "Creating user particular" | |
mysql --defaults-extra-file=mysql-login -D mysql -e "create user particular identified by 'Welcome1' ;" | |
echo "Giving user particular access to schema nservicebus" | |
mysql --defaults-extra-file=mysql-login -D mysql -e "grant all on *.* to particular@'%' ;" | |
$connectionString = "Data Source=localhost;Initial Catalog=nservicebus;User ID=particular;Password=Welcome1;AllowUserVariables=True;AutoEnlist=false;ConnectionReset=true;Connect Timeout=60" | |
echo "MySQLConnectionString=$connectionString" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
- name: Setup Oracle | |
id: setup-oracle | |
if: matrix.engine == 'Oracle' | |
uses: Particular/setup-oracle-action@v1.6.0 | |
with: | |
connection-string-name: OracleConnectionString | |
init-script: ./.github/workflows/scripts/setup-oracle-database-users-and-permissions.sql | |
tag: SqlPersistence | |
registry-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
registry-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Prepare Connection Strings for Oracle | |
if: matrix.engine == 'Oracle' | |
run: | | |
$connectionString = $Env:OracleConnectionString | |
"OracleConnectionString=$($connectionString.Replace('system', 'particular'))" >> $Env:GITHUB_ENV | |
"OracleConnectionString_Particular2=$($connectionString.Replace('system', 'particular2'))" >> $Env:GITHUB_ENV | |
- name: Run tests | |
uses: Particular/run-tests-action@v1.7.0 |