Skip to content

Add metadata and type fixtures for IcebergSharp tests #1

Add metadata and type fixtures for IcebergSharp tests

Add metadata and type fixtures for IcebergSharp tests #1

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
DOTNET_NOLOGO: 'true'
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'
NUGET_XMLDOC_MODE: skip
jobs:
build:
name: build-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET (from global.json)
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
dotnet-version: |
8.0.x
9.0.x
- name: NuGet package cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('**/Directory.Packages.props', '**/*.csproj') }}
restore-keys: |
nuget-${{ runner.os }}-
- name: Restore
run: dotnet restore IcebergSharp.slnx
- name: Build
run: dotnet build IcebergSharp.slnx --configuration Release --no-restore
- name: Unit tests
run: >
dotnet test tests/IcebergSharp.Tests/IcebergSharp.Tests.csproj
--configuration Release
--no-build
--logger "trx;LogFileName=test-results.trx"
--collect "XPlat Code Coverage"
--results-directory artifacts/test-results
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}
path: artifacts/test-results/
retention-days: 7
format:
name: format & analyzers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Verify formatting
run: dotnet format IcebergSharp.slnx --verify-no-changes --severity info
pack:
name: pack (dry run)
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore
run: dotnet restore IcebergSharp.slnx
- name: Pack
run: >
dotnet pack IcebergSharp.slnx
--configuration Release
--no-restore
--output artifacts/packages
-p:ContinuousIntegrationBuild=true
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: nupkg-preview
path: artifacts/packages/*.nupkg
retention-days: 14