Skip to content

Use pre-commit rather than linting with black #22

Use pre-commit rather than linting with black

Use pre-commit rather than linting with black #22

name: Testing with Conda
on:
pull_request:
types: [synchronize, opened, reopened]
branches:
- main
concurrency: # Cancel previous workflows on the same pull request
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
testing:
name: Test on ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- 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
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: test_env.yml
- name: Install package
run: |
pip install git+https://github.com/NeuralEnsemble/python-neo.git
pip install git+https://github.com/zm711/spikeanalysis.git
- name: Configure Git
run: |
git config --global user.email "sa@fake.com"
git config --global user.name "sa CI"
- name: Test with pytest
run: |
conda install pytest
pytest