Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Tests

# Builds everything, native and managed, and runs the tests. One workflow for every repository, as marks.yml: the core
# runs it as it is; a module calls it and is checked out into modules/ of a checkout of the core.
#
# Windows with the Visual Studio the native toolset asks for (Shared/Build/Stellar.Native.props), C++/CLI included.

on:
push:
branches: [develop, master]
pull_request:
workflow_call:

permissions:
contents: read

concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
tests:
name: Tests
if: vars.STELLAR_MIRROR != 'true'
runs-on: windows-2025-vs2026
timeout-minutes: 45
env:
IS_CORE: ${{ github.event.repository.name == 'StellarEngine-Core' }}
DOTNET_NOLOGO: 'true'
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
steps:
- name: Checkout
if: env.IS_CORE == 'true'
uses: actions/checkout@v5

- name: Checkout the core
if: env.IS_CORE != 'true'
uses: actions/checkout@v5
with:
repository: QuantumDevTeam/StellarEngine-Core
ref: develop

- name: Checkout the module
if: env.IS_CORE != 'true'
uses: actions/checkout@v5
with:
path: modules/${{ github.event.repository.name }}

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json

- name: Build and test the core
if: env.IS_CORE == 'true'
shell: pwsh
run: |
New-Item -ItemType Directory -Force packages | Out-Null
./scripts/build.ps1 -Configuration Debug

# Its own tests ran in the repository of the core
- name: Install the core
if: env.IS_CORE != 'true'
shell: pwsh
run: |
New-Item -ItemType Directory -Force packages | Out-Null
./scripts/build.ps1 -Configuration Debug -SkipTests -Install -NoUserRegistration

- name: Build and test the module
if: env.IS_CORE != 'true'
shell: pwsh
env:
MODULE: ${{ github.event.repository.name }}
run: |
dotnet run --project SDK/src/Stellar.Cli/Stellar.Cli.csproj -c Debug --no-build -- modules build $env:MODULE --tests --pack
exit $LASTEXITCODE
15 changes: 15 additions & 0 deletions Shared/Templates/Modules/Managed/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Tests

# The module built and tested on the core, by the workflow of the core.

on:
push:
branches: [develop, master]
pull_request:

permissions:
contents: read

jobs:
tests:
uses: QuantumDevTeam/StellarEngine-Core/.github/workflows/tests.yml@develop
Loading