File tree Expand file tree Collapse file tree 4 files changed +82
-0
lines changed Expand file tree Collapse file tree 4 files changed +82
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Continuous Integration
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+
7
+ permissions :
8
+ contents : read
9
+
10
+ jobs :
11
+ test :
12
+ name : Tests
13
+ strategy :
14
+ matrix :
15
+ os :
16
+ # ignore ARM64 flavours
17
+ - macos-12-large
18
+ - macos-13-large
19
+ - macos-14-large
20
+ - ubuntu-20.04
21
+ - ubuntu-22.04
22
+ - ubuntu-24.04
23
+ - windows-2019
24
+ - windows-2022
25
+
26
+ runs-on : ubuntu-latest
27
+
28
+ permissions :
29
+ deployments : write
30
+
31
+ steps :
32
+ # cloning into "root" does not work when trying to call the action from itself
33
+ # inspired by Microsoft: https://github.com/microsoft/action-python/blob/c8ec939994d7ed2ec77b7bbe59ed5f5b72fb5607/.github/workflows/test.yml#L21
34
+ - name : Checkout
35
+ uses : actions/checkout@v4
36
+ with :
37
+ path : action
38
+ clean : true
39
+
40
+ - name : Test
41
+ uses : ./action
42
+ with :
43
+ components : sqlcmd
44
+
45
+ - name : Run tests
46
+ run : |
47
+ action/test.ps1
48
+ shell : pwsh
Original file line number Diff line number Diff line change
1
+ name : " Setup MSSQL"
2
+ branding :
3
+ icon : " database"
4
+ color : " yellow"
5
+ description : " Installs an MSSQL server and client"
6
+ inputs :
7
+ components :
8
+ description : " The components to install"
9
+ required : true
10
+ runs :
11
+ using : " composite"
12
+ steps :
13
+ - shell : pwsh
14
+ run : |
15
+ $params = @{
16
+ Install = ("${{ inputs.install }}" -split ",").Trim()
17
+ }
18
+
19
+ ${{ github.action_path }}/instal.ps1 @params
Original file line number Diff line number Diff line change
1
+ if (" sqlcmd" -in $Install ) {
2
+ if ($ismacos ) {
3
+ Write-Output " Installing sqlcmd tools"
4
+ brew install sqlcmd
5
+ }
6
+
7
+ # Linux and Windows runner already contain sqlclient tools
8
+ Write-Output " sqlclient tools are installed"
9
+ }
Original file line number Diff line number Diff line change
1
+ if (Get-Command sqlcmd - ErrorAction SilentlyContinue) {
2
+ Write-Output " sqlcmd command exists."
3
+ } else {
4
+ Write-Output " sqlcmd command does not exist."
5
+ exit 1
6
+ }
You can’t perform that action at this time.
0 commit comments