Files
Orchard/.github/workflows/specflow.yml
Benedek Farkas 4268b28d95 Adding release package workflow (#8846)
* Updating release-package workflow

* Updating 3rd-party actions to their latest versions

* Testing artifact upload without separate compress step to avoid double-zipping [skip ci]

Hopefully it doesn't have horrible performance anymore

* Updating release-package workflow [skip ci]
2025-09-29 20:53:30 +02:00

60 lines
1.6 KiB
YAML

name: SpecFlow Tests
# Compiles the solution and runs unit tests, as well the SpecFlow tests on the main development branches.
on:
workflow_dispatch:
push:
branches:
- 1.10.x
- dev
schedule:
- cron: '0 0 * * 1' # Every Monday midnight.
jobs:
define-matrix:
name: Define Strategy Matrix
runs-on: ubuntu-24.04
outputs:
branches: ${{ steps.branches.outputs.branches }}
steps:
- name: Define Branches
id: branches
run: |
if [ "${{ github.event_name }}" = "schedule" ]; then
echo 'branches=["1.10.x", "dev"]' >> "$GITHUB_OUTPUT"
else
echo 'branches=["${{ github.ref_name }}"]' >> "$GITHUB_OUTPUT"
fi
compile:
name: SpecFlow Tests
needs: define-matrix
runs-on: windows-2025
strategy:
matrix:
branch: ${{ fromJSON(needs.define-matrix.outputs.branches) }}
fail-fast: false
defaults:
run:
shell: cmd
steps:
- name: Clone Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ matrix.branch }}
- name: Restore NuGet Packages
run: nuget restore src/Orchard.sln
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- name: Compile
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:MvcBuildViews=true /p:TreatWarningsAsErrors=true -WarnAsError
- name: Test
run: msbuild Orchard.proj /m /v:minimal /t:Test
- name: Spec
run: msbuild Orchard.proj /m /v:minimal /t:Spec