Skip to content

CI

CI #2507

Workflow file for this run

name: CI
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
workflow_dispatch: # For manual triggering
push:
branches: [ master, develop, public ]
pull_request:
branches: [ master, develop ]
jobs:
detect-outstanding-prs: # Don't run builds for push events if associated with PR
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
outputs:
abort: ${{ steps.debounce.outputs.abort }}
steps:
- name: Debounce
if: github.event_name == 'push'
id: debounce
run: |
pr_branches=$(gh pr list --json headRefName --repo $GITHUB_REPOSITORY)
if [[ $(echo "$pr_branches" | jq -r --arg GITHUB_REF '.[].headRefName | select(. == $GITHUB_REF)') ]]; then
echo "This push is associated with a pull request. Skipping the job."
echo "abort=true" >> "$GITHUB_OUTPUT"
fi
build:
name: build (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: debounce

Check failure on line 33 in .github/workflows/ibllib_ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ibllib_ci.yml (Line: 33, Col: 12): Job 'build' depends on unknown job 'debounce'.
if: needs.debounce.outputs.abort != 'true'
strategy:
fail-fast: false # Whether to stop execution of other instances
max-parallel: 2
matrix:
os: ["windows-latest", "ubuntu-latest"]
python-version: ["3.8", "3.11"]
exclude:
- os: windows-latest
python-version: 3.8
- os: ubuntu-latest
python-version: 3.11
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install deps
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
pip install -r requirements.txt
pip install -e .
- name: Flake8
run: |
python -m flake8
- name: Brainbox tests
run: |
cd brainbox
pytest
- name: ibllib tests
run: |
cd ibllib
cd tests
python -m unittest discover