From 3f10f4a1f6837ebbd505ea1fc745143d486fb725 Mon Sep 17 00:00:00 2001 From: codex Date: Wed, 24 Jun 2026 15:31:04 -0500 Subject: [PATCH] Add Forgejo CI workflows --- .forgejo/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ .forgejo/workflows/tests.yml | 35 +++++++++++++++++++++++++++++++++++ README.md | 3 +++ 3 files changed, 73 insertions(+) create mode 100644 .forgejo/workflows/build.yml create mode 100644 .forgejo/workflows/tests.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..58783dc --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: src + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Restore local tools + run: dotnet tool restore + + - name: Restore dependencies + run: dotnet restore CsMic.sln + + - name: Build + run: dotnet build CsMic.sln --no-restore diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml new file mode 100644 index 0000000..9f124ce --- /dev/null +++ b/.forgejo/workflows/tests.yml @@ -0,0 +1,35 @@ +name: Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + tests: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: src + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Restore local tools + run: dotnet tool restore + + - name: Restore dependencies + run: dotnet restore CsMic.sln + + - name: Run tests + run: dotnet test CsMic.sln --no-restore diff --git a/README.md b/README.md index 19cee91..61d3ec0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ CS-MIC is a small, embeddable expression interpreter for .NET applications. It is designed for places where users need to enter flexible numeric input, while the host application needs a deterministic decimal result and a controlled extension surface. +![Build](https://git.jordanwages.com/wagesj45/cs-mic/actions/workflows/build.yml/badge.svg?branch=main) +![Tests](https://git.jordanwages.com/wagesj45/cs-mic/actions/workflows/tests.yml/badge.svg?branch=main) + The 2.0 release separates the project into two NuGet packages: - `CSMic`: the core parser, interpreter, variable store, and custom function API.