Repository navigation
79 lines (62 loc) · 1.72 KB
/
Copy pathtests.yml
File metadata and controls
79 lines (62 loc) · 1.72 KB
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
name: .Net Core Tests
defaults:
run:
shell: bash
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "*" ]
paths:
- "**"
- "!**.md"
- "!benchmark/BenchmarkDotNet.Artifacts/**"
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./unit-tests
steps:
- uses: actions/checkout@v7
- name: Load tool versions
working-directory: ${{ github.workspace }}
run: cat scripts/tool-versions.env >> "$GITHUB_ENV"
- name: Set up .NET from global.json
uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
- uses: sqlc-dev/setup-sqlc@v5
with:
sqlc-version: '${{ env.SQLC_VERSION }}'
- name: Dotnet publish
run: dotnet publish ../LocalRunner -c release --output dist/
- name: Verify pushed generated code is synced
run: sqlc diff
- name: Run Tests
run: |
dotnet test RepositoryTests
dotnet test CodegenTests
end2end-tests:
name: End-to-End Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up .NET
uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
- name: Load .env file
uses: xom9ikk/dotenv@v2.4.0
with:
load-mode: strict
- name: Docker compose
uses: hoverkraft-tech/compose-action@v3.2.0
- name: Run Tests
run: ./end2end/scripts/run_tests.sh