Skip to content

Commit 9028403

Browse files
author
Joanna May
committed
test: final few tests and documentation examples
1 parent cc5fce8 commit 9028403

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1196
-435
lines changed

.github/workflows/publish.yaml

Lines changed: 0 additions & 120 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: "📦 Release"
2+
on:
3+
# Make a release whenever the developer wants.
4+
workflow_dispatch:
5+
inputs:
6+
bump:
7+
type: choice
8+
description: "version bump method: major, minor, or patch"
9+
required: true
10+
default: "patch"
11+
options:
12+
- major
13+
- minor
14+
- patch
15+
jobs:
16+
release:
17+
name: "📦 Release"
18+
runs-on: ubuntu-latest
19+
env:
20+
DOTNET_CLI_TELEMETRY_OPTOUT: true
21+
DOTNET_NOLOGO: true
22+
steps:
23+
- name: 🧾 Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
token: ${{ secrets.GH_BASIC }}
27+
lfs: true
28+
submodules: "recursive"
29+
fetch-depth: 0 # So we can get all tags.
30+
31+
- name: 🔎 Read Current Project Version
32+
id: current-version
33+
uses: WyriHaximus/github-action-get-previous-tag@v1
34+
with:
35+
fallback: "0.0.0-devbuild"
36+
37+
- name: 🖨 Print Current Version
38+
run: |
39+
echo "Current Version: ${{ steps.current-version.outputs.tag }}"
40+
41+
- name: 🧮 Compute Next Version
42+
uses: chickensoft-games/next-godot-csproj-version@v1
43+
id: next-version
44+
with:
45+
project-version: ${{ steps.current-version.outputs.tag }}
46+
# This action was designed to pin versions to Godot versions, but
47+
# if you pass a stable version in it just bumps the project version
48+
# that you give it.
49+
godot-version: 1.0.0
50+
bump: ${{ inputs.bump }}
51+
52+
- uses: actions/setup-dotnet@v4
53+
name: 💽 Setup .NET SDK
54+
with:
55+
# Use the .NET SDK from global.json in the root of the repository.
56+
global-json-file: global.json
57+
58+
# Write version to file so .NET will build correct version.
59+
- name: 📝 Write Version to File
60+
uses: jacobtomlinson/gha-find-replace@v3
61+
with:
62+
find: "0.0.0-devbuild"
63+
replace: ${{ steps.next-version.outputs.version }}
64+
regex: false
65+
include: Chickensoft.LogicBlocks/Chickensoft.LogicBlocks.csproj
66+
67+
- name: 📝 Write Diagram Generator Version to File
68+
uses: jacobtomlinson/gha-find-replace@v3
69+
with:
70+
find: "0.0.0-devbuild"
71+
replace: ${{ steps.next-version.outputs.version }}
72+
regex: false
73+
include: Chickensoft.LogicBlocks.DiagramGenerator/Chickensoft.LogicBlocks.DiagramGenerator.csproj
74+
75+
- name: 📦 Build
76+
run: |
77+
dotnet build \
78+
Chickensoft.LogicBlocks/Chickensoft.LogicBlocks.csproj -c Release
79+
dotnet build \
80+
Chickensoft.LogicBlocks.DiagramGenerator/Chickensoft.LogicBlocks.DiagramGenerator.csproj -c Release
81+
82+
- name: 🔎 Get Package Path
83+
id: package-path
84+
run: |
85+
package=$(find Chickensoft.LogicBlocks/nupkg -type f -name "*.nupkg")
86+
echo "package=$package" >> "$GITHUB_OUTPUT"
87+
echo "📦 Found package: $package"
88+
89+
- name: 🔎 Get Generator Package Path
90+
id: gen-package-path
91+
run: |
92+
package=$(find Chickensoft.LogicBlocks.DiagramGenerator/nupkg -type f -name "*.nupkg")
93+
echo "package=$package" >> "$GITHUB_OUTPUT"
94+
echo "📦 Found generator package: $package"
95+
96+
# - name: ✨ Create Release
97+
# env:
98+
# GITHUB_TOKEN: ${{ secrets.GH_BASIC }}
99+
# run: |
100+
# version="${{ steps.next-version.outputs.version }}"
101+
# gh release create --title "v$version" --generate-notes "$version" \
102+
# "${{ steps.package-path.outputs.package }}" "${{ steps.gen-package-path.outputs.package }}"
103+
104+
# - name: 🛜 Publish to Nuget
105+
# run: |
106+
# dotnet nuget push "${{ steps.package-path.outputs.package }}" \
107+
# --api-key "${{ secrets.NUGET_API_KEY }}" \
108+
# --source "https://api.nuget.org/v3/index.json" --skip-duplicate
109+
110+
# dotnet nuget push "${{ steps.gen-package-path.outputs.package }}" \
111+
# --api-key "${{ secrets.NUGET_API_KEY }}" \
112+
# --source "https://api.nuget.org/v3/index.json" --skip-duplicate

Chickensoft.LogicBlocks.DiagramGenerator.Tests/badges/branch_coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

Chickensoft.LogicBlocks.DiagramGenerator.Tests/badges/line_coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

Chickensoft.LogicBlocks.DiagramGenerator.Tests/test_cases/HeaterTest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,8 @@ public static void BindingsRespondToHeater() {
7575
"Heater turned off",
7676
"Heater is powered",
7777
"Heater is idling",
78-
"Heater is powered",
7978
"Heater is heating",
8079
"Finished heating :)",
81-
"Heater is powered",
8280
"Heater is idling"
8381
]);
8482
}

Chickensoft.LogicBlocks.DiagramGenerator/Chickensoft.LogicBlocks.DiagramGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<DebugType>portable</DebugType>
1616

1717
<Title>LogicBlocks Generator</Title>
18-
<Version>4.2.2</Version>
18+
<Version>0.0.0-devbuild</Version>
1919
<Description>See what your hierarchical state machine code looks like as a diagram!</Description>
2020
<Copyright>© 2024 Chickensoft Games</Copyright>
2121
<Authors>Chickensoft</Authors>

Chickensoft.LogicBlocks.Example/Chickensoft.LogicBlocks.Example.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Chickensoft.Introspection" Version="1.1.0" />
20-
<PackageReference Include="Chickensoft.Introspection.Generator" Version="1.1.0" PrivateAssets="all" OutputItemType="analyzer" />
19+
<PackageReference Include="Chickensoft.Introspection" Version="1.2.0" />
20+
<PackageReference Include="Chickensoft.Introspection.Generator" Version="1.2.0" PrivateAssets="all" OutputItemType="analyzer" />
2121

2222
<ProjectReference Include="../Chickensoft.LogicBlocks/Chickensoft.LogicBlocks.csproj" />
2323
<ProjectReference Include="../Chickensoft.LogicBlocks.DiagramGenerator/Chickensoft.LogicBlocks.DiagramGenerator.csproj" PrivateAssets="all" OutputItemType="analyzer" />

Chickensoft.LogicBlocks.Tests/Chickensoft.LogicBlocks.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
</ItemGroup>
3939

4040
<ItemGroup>
41-
<PackageReference Include="Chickensoft.Introspection" Version="1.1.0" />
42-
<PackageReference Include="Chickensoft.Introspection.Generator" Version="1.1.0" PrivateAssets="all" OutputItemType="analyzer" />
41+
<PackageReference Include="Chickensoft.Introspection" Version="1.2.0" />
42+
<PackageReference Include="Chickensoft.Introspection.Generator" Version="1.2.0" PrivateAssets="all" OutputItemType="analyzer" />
4343

4444
<ProjectReference Include="../Chickensoft.LogicBlocks/Chickensoft.LogicBlocks.csproj" />
4545
<ProjectReference Include="../Chickensoft.LogicBlocks.DiagramGenerator/Chickensoft.LogicBlocks.DiagramGenerator.csproj" PrivateAssets="all" OutputItemType="analyzer" />

Chickensoft.LogicBlocks.Tests/badges/branch_coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

Chickensoft.LogicBlocks.Tests/badges/line_coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

Chickensoft.LogicBlocks.Tests/coverage.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
dotnet build-server shutdown; dotnet build --no-incremental
3+
# dotnet build-server shutdown; dotnet build --no-incremental
4+
dotnet build
45

56
dotnet test \
67
-p:CollectCoverage=true \

Chickensoft.LogicBlocks.Tests/test/fixtures/LogicBlockConsumer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ public class LogicBlockConsumer {
88
public bool SawState { get; private set; }
99
public bool SawError { get; private set; }
1010

11-
public MyLogicBlock Logic { get; }
11+
public IMyLogicBlock Logic { get; }
1212
public MyLogicBlock.IBinding Binding { get; }
1313

14-
public LogicBlockConsumer(MyLogicBlock logic) {
14+
public LogicBlockConsumer(IMyLogicBlock logic) {
1515
Logic = logic;
1616
Binding = logic.Bind();
1717

Chickensoft.LogicBlocks.Tests/test/src/InputQueueTest.cs

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)