-
-
Notifications
You must be signed in to change notification settings - Fork 40
82 lines (78 loc) · 2.13 KB
/
CI.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on: [push]
jobs:
import:
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@v1
- name: Perform the import
shell: pwsh
run: Install-Module PSFramework -Force; Import-Module ./dbops.psd1 -ErrorAction Stop
functional-tests:
name: Functional tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type: [sqlserver, postgresql, oracle, mysql]
include:
- image: dbatools/sqlinstance
port: 1433
type: sqlserver
env: {}
- image: postgres:14
port: 5432
type: postgresql
env:
POSTGRES_PASSWORD: Password12!
POSTGRES_HOST_AUTH_METHOD: md5
- image: mysql:8.0
port: 3306
type: mysql
env:
MYSQL_ROOT_PASSWORD: Password12!
- image: wnameless/oracle-xe-11g-r2
port: 1521
type: oracle
env:
ORACLE_ALLOW_REMOTE: true
services:
db:
image: ${{ matrix.image }}
ports:
- ${{ matrix.port }}:${{ matrix.port }}
env: ${{ matrix.env }}
env:
TZ: UTC
steps:
- uses: actions/checkout@v1
- name: Prepare
shell: pwsh
run: tests/functional.prep.ps1 -Type ${{ matrix.type }}
- name: Run tests
shell: pwsh
run: tests/ci.pester.ps1 -Tag FunctionalTests -Type ${{ matrix.type }}
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v1
- name: Prepare
shell: pwsh
run: tests/pester.prep.ps1
- name: Run unittests
shell: pwsh
run: tests/ci.pester.ps1 -Tag UnitTests
- name: Run integration tests
shell: pwsh
run: tests/ci.pester.ps1 -Tag IntegrationTests
- name: Run compliance tests
shell: pwsh
run: tests/ci.pester.ps1 -Tag ComplianceTests