-
-
Notifications
You must be signed in to change notification settings - Fork 808
63 lines (56 loc) · 2.06 KB
/
gallery.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Test version in Gallery
on:
workflow_dispatch:
push:
branches:
- master
defaults:
run:
shell: pwsh
jobs:
linux-tests:
env:
SMODefaultModuleName: dbatools
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Install and cache PowerShell modules
uses: potatoqualitee/[email protected]
with:
modules-to-cache: dbatools.library:2024.4.12
- name: Download dbatools from Gallery
run: |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module dbatools -AllowPrerelease
- name: Set encryption values
run: |
Import-Module dbatools
Set-DbatoolsInsecureConnection
Get-DbatoolsConfigValue -FullName sql.connection.encrypt | Write-Warning
- name: Setup docker images
run: |
# create a shared network
docker network create localnet
# Expose engine and endpoint then setup a shared path for migrations
docker run -p 1433:1433 --volume shared:/shared:z --name mssql1 --hostname mssql1 --network localnet -d dbatools/sqlinstance
# Expose second engine and endpoint on different port
docker run -p 14333:1433 --volume shared:/shared:z --name mssql2 --hostname mssql2 --network localnet -d dbatools/sqlinstance2
- name: 👥 Clone appveyor repo
working-directory: /tmp
run: |
gh repo clone dataplat/appveyor-lab
- name: Run tests
env:
TENANTID: ${{secrets.TENANTID}}
CLIENTID: ${{secrets.CLIENTID}}
CLIENTSECRET: ${{secrets.CLIENTSECRET}}
CLIENT_GUID: ${{secrets.CLIENT_GUID}}
CLIENT_GUID_SECRET: ${{secrets.CLIENT_GUID_SECRET}}
run: |
Import-Module dbatools -Force
$null = Invoke-Pester ./tests/gh-actions.ps1 -Output Detailed -PassThru