Merge pull request #107 from lvchkn/dependabot/nuget/Testcontainers.P… #182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-and-test | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: | | |
HackerNewsCommentsFeed/ | |
Application/ | |
Domain/ | |
Infrastructure/ | |
Shared/ | |
Tests/ | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifacts | |
path: artifacts/ | |
- name: Test | |
working-directory: artifacts/Tests/ | |
env: | |
GithubAuth:AppName: ${{ secrets.GH_AUTH_APP_NAME }} | |
GithubAuth:ClientId: ${{ secrets.GH_AUTH_CLIENT_ID }} | |
GithubAuth:ClientSecret: ${{ secrets.GH_AUTH_TEST_CLIENT_SECRET }} | |
run: | | |
dotnet restore | |
dotnet test --no-build --verbosity normal |