Skip to content

Added better utility scripts that are platform independent #20

Added better utility scripts that are platform independent

Added better utility scripts that are platform independent #20

Workflow file for this run

name: CI Test
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install pytest
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Install dependencies using aplustools
run: |
python -c "import aplustools; aplustools.install_all_dependencies()"
- name: Prepare test_data directory (macOS/Linux)
if: runner.os != 'Windows'
run: |
DIR=test_data
if [ -d "$DIR" ]; then
echo "Clearing directory $DIR..."
rm -rf "$DIR"
fi
echo "Creating directory $DIR..."
mkdir "$DIR"
- name: Prepare test_data directory (Windows)
if: runner.os == 'Windows'
run: |
$dir = "test_data"
if (Test-Path $dir) {
Write-Host "Clearing directory $dir..."
Remove-Item -Recurse -Force $dir
}
Write-Host "Creating directory $dir..."
New-Item -ItemType Directory -Force -Path $dir
- name: Install package
run: |
pip install -e .
- name: Run tests
run: |
echo "Running tests..."
pytest aplustools/tests
echo "Tests completed."