Removed the install_dependencies functions and replaced them with opt… #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 aplustools with all optional dependencies | |
run: | | |
pip install -e '.[all]' | |
- 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 src/aplustools/tests | |
echo "Tests completed." |