File: validate-pull-request.yaml

package info (click to toggle)
bmtk 1.1.1%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 204,044 kB
  • sloc: python: 37,064; javascript: 1,998; makefile: 42; sh: 33
file content (70 lines) | stat: -rw-r--r-- 1,685 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Unit Tests
on:
  pull_request:
    branches:
      - develop
      - release/**
    paths:
      - bmtk/**
      - .github/workflows/**

jobs:
  run-tests:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-20.04]
        python-version: ["3.6", "3.7", "3.8", "3.9"]

    steps:
      - uses: actions/checkout@v2
      
      - name: Install Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
      
      - name: Install Requirements
        run: |
          pip install -r test_requirements.txt
          pip install neuron==8.0.0
          pip install .

      - name: Check NRN mechanisms directory exists
        id: has_mechanisms_dir
        uses: andstor/file-existence-action@v1
        with:
          files: bmtk/tests/simulator/bionet/components/mechanisms

      - name: Setup NEURON
        if: steps.has_mechanisms_dir.outputs.files_exists == 'true'
        run: |
          cd bmtk/tests/simulator/bionet/components/mechanisms
          nrnivmodl modfiles

      - name: Run Tests
        run: |
          pytest --cov=bmtk --cov-report=html bmtk/tests
          
  linter:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        python-version: [3.8]

    steps:
      - uses: actions/checkout@v2

      - name: Install Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install Requirements
        run: |
          pip install -r test_requirements.txt

      - name: Run Python Linter
        run: |
          flake8 bmtk --exit-zero --statistics --count