Skip to content

Commit

Permalink
Add new GitHub Actions to do unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsakamoto committed Mar 6, 2024
1 parent c12224a commit ade8f99
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Install .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
# Install .NET SDK
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-quality: 'preview'
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: unit tests

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v4

# Install .NET SDK
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
# Install SQL Server
- name: Setup SQL Server
run: docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=$MSSQL_PWD" -p 1433:1433 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2019-latest

# Perform unit tests
- name: Perform unit tests
run: dotnet test HotKeys2.Test -l "console;verbosity=normal" -v:q --nologo

0 comments on commit ade8f99

Please sign in to comment.