|
3 | 3 | name: SpeechBrain toolkit CI |
4 | 4 |
|
5 | 5 | # Runs on pushes to master and all pull requests |
6 | | -on: |
7 | | - push: |
8 | | - branches: [master] |
9 | | - pull_request: |
| 6 | +on: # yamllint disable-line rule:truthy |
| 7 | + push: |
| 8 | + branches: [master] |
| 9 | + pull_request: |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - linters: |
13 | | - name: Linters |
14 | | - runs-on: ubuntu-latest |
15 | | - steps: |
16 | | - - uses: actions/checkout@v2 |
17 | | - - name: Set up Python 3.7 |
18 | | - uses: actions/setup-python@v1 |
19 | | - with: |
20 | | - python-version: 3.7 |
21 | | - - name: Lint dependencies |
22 | | - run: | |
23 | | - python -m pip install --upgrade pip |
24 | | - pip install -r lint-requirements.txt |
25 | | - - name: Show errors separately |
26 | | - uses: samuelmeuli/lint-action@v1 |
27 | | - with: |
28 | | - github_token: ${{ secrets.github_token }} |
29 | | - # Enable linters |
30 | | - black: true |
31 | | - flake8: true |
32 | | - - name: Run lint again for error code |
33 | | - run: | |
34 | | - flake8 . --count --show-source --statistics |
35 | | - black --check --diff . |
| 12 | + linters: |
| 13 | + name: Linters |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - name: Set up Python 3.7 |
| 18 | + uses: actions/setup-python@v1 |
| 19 | + with: |
| 20 | + python-version: 3.7 |
| 21 | + - name: Lint dependencies |
| 22 | + run: | |
| 23 | + python -m pip install --upgrade pip |
| 24 | + pip install -r lint-requirements.txt |
| 25 | + - name: Show errors separately |
| 26 | + uses: samuelmeuli/lint-action@v1 |
| 27 | + with: |
| 28 | + github_token: ${{ secrets.github_token }} |
| 29 | + # Enable linters |
| 30 | + black: True |
| 31 | + flake8: True |
| 32 | + - name: Run lint again for error code |
| 33 | + run: | |
| 34 | + flake8 . --count --show-source --statistics |
| 35 | + black --check --diff . |
36 | 36 |
|
37 | | - unittests: |
38 | | - name: Unit Tests |
39 | | - runs-on: ubuntu-latest |
40 | | - steps: |
41 | | - - uses: actions/checkout@v2 |
42 | | - - name: Set up Python 3.7 |
43 | | - uses: actions/setup-python@v1 |
44 | | - with: |
45 | | - python-version: 3.7 |
46 | | - - name: Install libsndfile |
47 | | - run: | |
48 | | - sudo apt-get install -y libsndfile1 |
49 | | - - name: Full dependencies |
50 | | - run: | |
51 | | - pip install -r requirements.txt |
52 | | - pip install --editable . |
53 | | - - name: Unittests with pytest |
54 | | - run: | |
55 | | - pytest tests |
56 | | - - name: Doctests with pytest |
57 | | - run: | |
58 | | - pytest --doctest-modules speechbrain |
| 37 | + unittests: |
| 38 | + name: Unit Tests |
| 39 | + runs-on: ubuntu-latest |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v2 |
| 42 | + - name: Set up Python 3.7 |
| 43 | + uses: actions/setup-python@v1 |
| 44 | + with: |
| 45 | + python-version: 3.7 |
| 46 | + - name: Install libsndfile |
| 47 | + run: | |
| 48 | + sudo apt-get install -y libsndfile1 |
| 49 | + - name: Full dependencies |
| 50 | + run: | |
| 51 | + pip install -r requirements.txt |
| 52 | + pip install --editable . |
| 53 | + - name: Unittests with pytest |
| 54 | + run: | |
| 55 | + pytest tests |
| 56 | + - name: Doctests with pytest |
| 57 | + run: | |
| 58 | + pytest --doctest-modules speechbrain |
0 commit comments