forked from sourcegit-scm/sourcegit
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.42 KB
/
ci.yml
File metadata and controls
51 lines (51 loc) · 1.42 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
name: Continuous Integration
on:
push:
branches: [develop]
pull_request:
branches: [develop]
workflow_dispatch:
workflow_call:
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
test:
name: Test
needs: build
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v6
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore tests/SourceGit.Tests/SourceGit.Tests.csproj
- name: Build tests
run: dotnet build tests/SourceGit.Tests/SourceGit.Tests.csproj -c Release --no-restore
- name: Run tests
run: dotnet test tests/SourceGit.Tests/SourceGit.Tests.csproj -c Release --no-build --verbosity normal
version:
name: Prepare version string
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Output version string
id: version
run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
package:
needs: [build, test, version]
name: Package
uses: ./.github/workflows/package.yml
with:
version: ${{ needs.version.outputs.version }}