Changed CI file to run tests on push #77
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 | ||
on: [pull_request, push] | ||
jobs: | ||
SEDkit-CI: | ||
name: Python - ${{ matrix.python-version }} | ||
channels: | ||
- conda-forge | ||
- defaults | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 5 | ||
matrix: | ||
os: [macos-latest] | ||
python-version: [ '3.11' ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Upgrade pip | ||
run: | | ||
pip install --upgrade pip | ||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: | | ||
conda env update --file env/environment-${PYTHONVERSION}.yml --name sedkit-${{ matrix.python-version }} | ||
env: | ||
PYTHONVERSION: ${{ matrix.python-version }} | ||
- name: Install package | ||
run: | | ||
python setup.py develop --no-deps | ||
- name: Update conda | ||
run: | | ||
conda update --all | ||
- name: Test with pytest | ||
run: | | ||
conda run -n sedkit-${{ matrix.python-version }} pytest |