Skip to content

[WIP] Improve the codebase and along with downloads #102

[WIP] Improve the codebase and along with downloads

[WIP] Improve the codebase and along with downloads #102

Workflow file for this run

name: AstroPlasma Unit Tests
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
jobs:
e2e_testing:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
name: Checkout repository
- uses: actions/setup-python@v4
name: Install python and load cache
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: sed -i.bak "s/3\.11/${{ matrix.python-version }}/g" requirements/requirements.txt
name: Prepare the requirements file python version
shell: bash
- run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements.txt
name: Install python packages
- run: echo "dir_path=$(mktemp -d)" >> $GITHUB_OUTPUT
id: temp_dir
name: Create a temp directory
shell: bash
- run: |
ln -s $(realpath astro_plasma/data/solar_GASS10.abn) ${{ steps.temp_dir.outputs.dir_path }}
ln -s $(realpath astro_plasma/data/cooltable.dat) ${{ steps.temp_dir.outputs.dir_path }}
shell: bash
name: Link the data files to the temp directory
- run: pytest
name: Run python tests
env:
ASTRO_PLASMA_DATA_DIR: ${{ steps.temp_dir.outputs.dir_path }}
PYTHONPATH: ${{ github.workspace }}