-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Tests | ||
strategy: | ||
matrix: | ||
os: | ||
# ignore ARM64 flavours | ||
- macos-12-large | ||
- macos-13-large | ||
- macos-14-large | ||
- ubuntu-20.04 | ||
- ubuntu-22.04 | ||
- ubuntu-24.04 | ||
- windows-2019 | ||
- windows-2022 | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
# cloning into "root" does not work when trying to call the action from itself | ||
# inspired by Microsoft: https://github.com/microsoft/action-python/blob/c8ec939994d7ed2ec77b7bbe59ed5f5b72fb5607/.github/workflows/test.yml#L21 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: action | ||
clean: true | ||
|
||
- name: Run Action | ||
uses: ./action | ||
with: | ||
components: sqlcmd | ||
|
||
- name: Run tests | ||
run: | | ||
action/test.ps1 | ||
shell: pwsh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: "Setup MSSQL" | ||
branding: | ||
icon: "database" | ||
color: "yellow" | ||
description: "Installs an MSSQL server and client" | ||
inputs: | ||
components: | ||
description: "The components to install" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- shell: pwsh | ||
run: | | ||
$params = @{ | ||
Install = ("${{ inputs.install }}" -split ",").Trim() | ||
} | ||
${{ github.action_path }}/install.ps1 @params |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
if ("sqlcmd" -in $Install) { | ||
if ($ismacos) { | ||
Write-Output "Installing sqlcmd tools" | ||
brew install sqlcmd | ||
} | ||
|
||
# Linux and Windows runner already contain sqlclient tools | ||
Write-Output "sqlclient tools are installed" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if (Get-Command sqlcmd -ErrorAction SilentlyContinue) { | ||
Write-Output "sqlcmd command exists." | ||
} else { | ||
Write-Output "sqlcmd command does not exist." | ||
exit 1 | ||
} |