-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.39 KB
/
build-and-test.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
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