Group files by time and total integrations #861
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: JWQL CI | |
on: [push, pull_request] | |
jobs: | |
JWQL-CI: | |
name: Python - ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 5 | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: jwql-${{ matrix.python-version }} | |
- name: Bandit Check | |
uses: jpetrucciani/bandit-check@master | |
with: | |
path: "./jwql/" | |
bandit_flags: "-c .bandit" | |
continue-on-error: false | |
if: runner.os == 'Linux' | |
- name: Start Redis | |
uses: supercharge/[email protected] | |
with: | |
redis-version: 5.0 | |
if: runner.os == 'Linux' | |
- name: Build jwql conda environment and run tests | |
shell: bash -l {0} | |
run: | | |
echo "Setting useful environment variables:" | |
echo " " | |
export PYTHONVERSION=${{ matrix.python-version }} | |
export MAJOR="$(echo $PYTHONVERSION | head -c 1)" | |
export MINOR="$(echo $PYTHONVERSION | tail -c 2)" | |
echo "PYTHONVERSION: $PYTHONVERSION" | |
echo " " | |
echo "Installing jwql conda environment" | |
echo " " | |
cd $RUNNER_WORKSPACE/ | |
cd jwql/ | |
$CONDA/bin/conda env update -f environment_python_${MAJOR}_${MINOR}.yml -n jwql-${{ matrix.python-version }} | |
echo " " | |
echo "Installing jwql package" | |
echo " " | |
python setup.py develop | |
echo " " | |
echo "Testing package installation" | |
echo " " | |
python -c "import jwql; print('Version: ' + jwql.__version__); print('Path: ' + jwql.__path__[0])" | |
# echo " " | |
# echo "Reinstall numpy to fix numpy.core.multiarray error" | |
# echo " " | |
pip install -U numpy | |
echo " " | |
echo "The conda environment being used:" | |
echo " " | |
$CONDA/bin/conda env export | |
echo " " | |
echo "Running pytests" | |
echo " " | |
pytest jwql/tests/ |