name: build

on:
  push:
  pull_request:
  schedule:
    - cron: '0 20 * * 2'

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest,macos-latest,windows-latest]
        python-version: [3.9,"3.10"]
        numpy-version: ["1.20","1.21","1.22"]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip wheel
        pip install numpy==${{ matrix.numpy-version }}
        pip install pyparsing==2.4.7 # For issue with six which requires pyparsing < 3
        pip install cython # for compiliong h5py from source
    - name: Test downloads
      env:
        DUST_DIR: ${{github.workspace}}/data/
      run: |
        mkdir $DUST_DIR
        python setup.py install --test-downloads --all-downloads
    - name: Install package
      run: |
        python setup.py install --no-downloads

name: build

on:
  push:
  pull_request:
  schedule:
    - cron: '0 20 * * 2'

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest,macos-latest,windows-latest]
        python-version: [3.9,"3.10"]
        numpy-version: ["1.20","1.21","1.22"]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip wheel
        pip install numpy==${{ matrix.numpy-version }}
        pip install pyparsing==2.4.7 # For issue with six which requires pyparsing < 3
    - name: Create data directory
      if: runner.os == 'Windows'
      env:
        DUST_DIR: ${{github.workspace}}/data/
      run: New-Item -ItemType directory -Path $env:DUST_DIR
    - name: Create data directory
      if: runner.os != 'Windows'
      env:
        DUST_DIR: ${{github.workspace}}/data/
      run: mkdir $DUST_DIR  
    - name: Test downloads
      env:
        DUST_DIR: ${{github.workspace}}/data/
      run: |
        python setup.py install --test-downloads --all-downloads
    - name: Install package
      run: |
        python setup.py install --no-downloads

Create data directory on Windows
Create data directory on Windows
