Skip to content

Add GitHub Actions CI workflow for Linux builds and tests #14

Add GitHub Actions CI workflow for Linux builds and tests

Add GitHub Actions CI workflow for Linux builds and tests #14

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ '**' ]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.102'
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test (Linux)
if: runner.os == 'Linux'
run: dotnet test --configuration Release --no-build --verbosity normal
- name: Test (Windows - excluding Linux-only projects)
if: runner.os == 'Windows'
run: |
dotnet test test/Magma.Common.Facts --configuration Release --no-build --verbosity normal
dotnet test test/Magma.Internet.Ip.Facts --configuration Release --no-build --verbosity normal
dotnet test test/Magma.Link.Facts --configuration Release --no-build --verbosity normal