Skip to content

M1.6: shell-free Pipeline (Command.Pipe, pipefail, UncheckedInPipe) #12

M1.6: shell-free Pipeline (Command.Pipe, pipefail, UncheckedInPipe)

M1.6: shell-free Pipeline (Command.Pipe, pipefail, UncheckedInPipe) #12

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
yaml-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Install yamllint
run: pip install yamllint
# Config is .yamllint.yml — tuned for Actions YAML. Real defects (tabs,
# duplicate keys, bad indentation) fail; cosmetic line-length stays a
# non-failing warning.
- name: Lint YAML
run: yamllint .
format:
runs-on: ubuntu-latest
steps:
# Actions are pinned to a full commit SHA (supply-chain hardening); the
# trailing comment records the human-readable version. Dependabot bumps the
# SHA and updates the comment on its weekly run.
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5
with:
dotnet-version: '10.0.x'
# Fantomas is the F# formatter and this repo's style authority — the F#
# compiler does not enforce .editorconfig style the way Roslyn does for C#.
- name: Restore tools
run: dotnet tool restore
- name: Check formatting
run: dotnet fantomas --check src tests
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5
with:
dotnet-version: '10.0.x'
# Cache the global NuGet package folder across runs. Keyed on the central
# version files so the cache invalidates only when dependencies change.
- name: Cache NuGet packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('Directory.Packages.props', 'nuget.config', 'global.json') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --configuration Release --logger "trx;LogFileName=test-results.trx" --results-directory ./TestResults
# Test results are uploaded even when the Test step fails, so a red CI run
# can be diagnosed from the .trx without re-running locally.
- name: Upload test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results-${{ matrix.os }}
path: ./TestResults/*.trx
if-no-files-found: ignore