Skip to content

Commit

Permalink
Library Progress (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee authored Nov 10, 2022
1 parent 761115f commit 3481e32
Show file tree
Hide file tree
Showing 118 changed files with 687 additions and 311 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and test library
on: [push]
defaults:
run:
shell: pwsh
jobs:
linux-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build the library
shell: pwsh
run: |
sudo apt-get install msitools -y
./build/build-core.ps1
- name: Execute sqlpackage
shell: pwsh
run: |
return
Import-Module ./dbatools.library.psd1 -Force
$libpath = Split-Path -Path (Get-Module dbatools*library).Path
if ($IsWindows) {
$sqlpackage = "./lib/sqlpackage/windows/sqlpackage.exe"
}
if ($IsMacOS) {
$sqlpackage = "./lib/sqlpackage/mac/sqlpackage"
}
if ($IsLinux) {
$sqlpackage = "./lib/net6.0/sqlpackage"
}
. $sqlpackage | Select-String "Specifies a name value pair" | Should -Not -BeNullorEmpty
- uses: actions/upload-artifact@v3
with:
name: library
path: lib
41 changes: 41 additions & 0 deletions .github/workflows/sqlpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: sqlpackage test
on: [pull_request]

jobs:
build:
name: Module imports on all platforms
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v3

- name: Install and cache PowerShell modules
uses: potatoqualitee/[email protected]
with:
modules-to-cache: dbatools.core.library:2022.11.8
modules-to-cache-prerelease: dbatools.library:2022.11.8-preview

- name: Execute sqlpackage
shell: pwsh
run: |
return
Import-Module ./dbatools.psd1 -ErrorAction Stop
(Get-DbaManagementObject).LoadTemplate -ne $null
$libpath = Split-Path -Path (Get-Module dbatools*library).Path
if ($IsWindows) {
$sqlpackage = Join-DbaPath -Path $libpath -ChildPath lib, win, sqlpackage.exe
}
if ($IsMacOS) {
$sqlpackage = Join-DbaPath -Path $libpath -ChildPath lib, mac, sqlpackage
}
if ($IsLinux) {
$sqlpackage = Join-DbaPath -Path $libpath -ChildPath lib, sqlpackage
}
. $sqlpackage | Select-String "Specifies a name value pair" | Should -Not -BeNullorEmpty
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ debug.log
bin/
temp/
runtimes/
lib/
lib/
/third-party
/third-party-licenses
7 changes: 0 additions & 7 deletions .markdownlint.json

This file was deleted.

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Code of Conduct

SQLCollaborative Organization and the dbatools team is dedicated to providing a positive and harassment-free experience for everyone, regardless of age, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, ethnicity, race, religion, nationality, or level of experience. We do not tolerate harassment in any form, nor do we tolerate any behavior that would reasonably lead to someone being made to feel unsafe, insecure, or frightened for their physical or emotional well-being.
The Data Platform Community Organization and the dbatools team is dedicated to providing a positive and harassment-free experience for everyone, regardless of age, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, ethnicity, race, religion, nationality, or level of experience. We do not tolerate harassment in any form, nor do we tolerate any behavior that would reasonably lead to someone being made to feel unsafe, insecure, or frightened for their physical or emotional well-being.

This applies to all interactions here on GitHub, Slack, YouTube comments and YouTube chat. All communication should be appropriate for a professional audience including people of many different backgrounds.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# dbatools-library
# dbatools.library
147 changes: 0 additions & 147 deletions actions-build.ps1

This file was deleted.

Loading

0 comments on commit 3481e32

Please sign in to comment.