Skip to content

build

build #412

Workflow file for this run

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.11"]
numpy-version: ["1.23.0","1.24.0","1.25.0"]
steps:
- uses: actions/checkout@v4
- name: Cache dust maps
uses: actions/cache@v4
with:
path: ${{github.workspace}}/data/
key: sfd-green19-marshall06-combined15-${{ runner.os }}-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
pip install numpy~=${{ matrix.numpy-version }} scipy matplotlib astropy h5py tqdm
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 -Force -Path $env:DUST_DIR
- name: Create data directory
if: runner.os != 'Windows'
env:
DUST_DIR: ${{github.workspace}}/data/
run: mkdir -p $DUST_DIR
- name: Install package
env:
DUST_DIR: ${{github.workspace}}/data/
run: |
pip install -ve .
- name: Test package
env:
DUST_DIR: ${{github.workspace}}/data/
run: |
pip install pytest
pytest -v tests/