on:
  push:
    branches:
      - '**'
  pull_request:
    branches:
      - '**'

name: Overall-BARM-Test

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: ['3.10']

    steps:
      - uses: actions/checkout@v3
      - name: Set up R
        uses: r-lib/actions/setup-r@v2
      - name: Install dependencies
        run: Rscript -e "install.packages(c('BART'))"
#    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
            python-version: '3.10'
            cache: 'pip'
      - run: pip install -r requirements.txt
#    steps:
      - uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
#      - name: Fitting barn on mpg
#        run: python simple_nn_mcmc.py -s mpg -o testDir/ --no-warn
      - name: Run BARM test suite
        run: python -m unittest
