Skip to content

Add macOS to GitHub Actions workflow #4

Add macOS to GitHub Actions workflow

Add macOS to GitHub Actions workflow #4

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup Mono/F# (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y fsharp
- name: Setup Mono/F# (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install mono
- name: Make scripts executable and add to PATH
if: matrix.os != 'windows-latest'
run: |
chmod +x fsi
chmod +x test_fsi.fsx
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
- name: Run tests
run: ./test_fsi.fsx