Skip to content
Open
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
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches: [ master ]
pull_request:

permissions:
contents: read

# Cancel superseded runs for the same branch/PR.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build & Test
# Windows is required because the library and test suite also target .NET Framework (net47).
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive

- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x

- name: Restore
run: dotnet restore YamlDotNet.sln

- name: Build
run: dotnet build YamlDotNet.sln --configuration Release --no-restore

- name: Test
run: dotnet test YamlDotNet.Test/YamlDotNet.Test.csproj --configuration Release --no-build --logger "trx;LogFileName=test-results.trx"

- name: Upload test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: test-results
path: '**/TestResults/*.trx'
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ github.event.inputs.ref }}

# Make sure the required versions of dotnet core on the server
- name: Install dotnet 3.1
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v6
with:
dotnet-version: 3.1.x

- name: Install dotnet 6.0
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v6
with:
dotnet-version: 6.0.x

- name: Install dotnet 8.0
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v6
with:
dotnet-version: 8.0.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ github.event.inputs.ref }}
Expand Down
Loading