Skip to content

Commit

Permalink
🔧 add GHA to test tempdb on 3 operating systems
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffynuts committed Nov 14, 2023
1 parent 2f85810 commit c1a5734
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 9 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/test-tempdb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test-tempdb-windows:
runs-on: windows-latest
steps:
- name: Checkout project
uses: actions/checkout@v2

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1
6.x
7.x
- name: Setup NodeJS
uses: actions/setup-node@v2-beta
with:
node-version: '18'

- name: Build and test
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
SUPPRESS_DOWNLOAD_PROGRESS: 1
run: |
npm i
npm run test-tempdb
test-tempdb-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1
6.x
7.x
- name: Setup NodeJS
uses: actions/setup-node@v2-beta
with:
node-version: '18'

- name: Build and test
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
SUPPRESS_DOWNLOAD_PROGRESS: 1
run: |
npm i
npm run test-tempdb
test-tempdb-osx:
runs-on: macos-latest
steps:
- name: Checkout project
uses: actions/checkout@v3

- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1
6.x
7.x
- name: Setup NodeJS
uses: actions/setup-node@v2-beta
with:
node-version: '18'

- name: Build and test
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
SUPPRESS_DOWNLOAD_PROGRESS: 1
run: |
npm i
npm run test-tempdb
19 changes: 13 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@ jobs:
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 3
uses: actions/setup-dotnet@v1
- name: Checkout project
uses: actions/checkout@v2

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1
6.x
7.x
- uses: actions/setup-node@v2-beta
- name: Setup NodeJS
uses: actions/setup-node@v2-beta
with:
node-version: '18'

- name: Build and test
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
Expand All @@ -29,11 +34,13 @@ jobs:
run: |
npm i
npm run test-windows
- uses: actions/upload-artifact@v2
- name: Upload build reports
uses: actions/upload-artifact@v2
with:
name: build-reports
path: buildreports/

test-linux:
# disabled, for now, because it hangs
if: false
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
"license": "BSD-3-Clause",
"scripts": {
"test": "cross-env DOTNET_CORE=1 TEST_ADDITIONAL_EXCLUDE=PeanutButter.WindowsServiceManagement.Core.Tests zarro test-dotnet",
"test-tempdb": "cross-env DOTNET_CORE=1 TEST_INCLUDE=PeanutButter.TempDb.MySql.Data.Tests,PeanutButter.TempDb.MySql.Connector.Tests,PeanutButter.TempDb.Tests,PeanutButter.TempDb.Runner.Tests zarro test-dotnet",
"test-windows": "cross-env TEST_ADDITIONAL_EXCLUDE=PeanutButter.WindowsServiceManagement.Core.Tests,PeanutButter.WindowsServiceManagement.Tests zarro test-dotnet",
"test-ini": "cross-env DOTNET_CORE=1 TEST_INCLUDE=PeanutButter.INI.Tests zarro test",
"test-ini": "cross-env DOTNET_CORE=1 TEST_INCLUDE=PeanutButter.INI.Tests zarro test-dotnet",
"test-fx": "cross-env DOTNET_CORE=0 zarro test-dotnet",
"test-not-tempdb": "cross-env DOTNET_CORE=1 TEST_ADDITIONAL_EXCLUDE=source/TempDb/**/* zarro test-dotnet",
"test-tempdb": "cross-env DOTNET_TEST_PARALLEL=0 DOTNET_CORE=1 TEST_INCLUDE=source/TempDb/**/*Tests* zarro test-dotnet",
"test-tempdb-mysql-data": "cross-env DOTNET_CORE=1 TEST_INCLUDE=**/PeanutButter.TempDb.MySql.Data.Tests* zarro test-dotnet",
"build-with-msbuild": "cross-env DOTNET_CORE=0 zarro build",
"cover": "zarro cover-dotnet",
"postcover": "run-s generate-reports",
Expand Down
1 change: 1 addition & 0 deletions source/PeanutButter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3036AFBD-41FC-401F-9A7B-A5D61E688823}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\test.yml = ..\.github\workflows\test.yml
..\.github\workflows\test-tempdb.yml = ..\.github\workflows\test-tempdb.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{905D8BA4-13FC-4FE2-8290-9263E0180961}"
Expand Down

0 comments on commit c1a5734

Please sign in to comment.