123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- name: Python Test
- on:
- push:
- branches: [ master, development ]
- pull_request:
- branches: [ master, development ]
- jobs:
- test:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- python-version: [3.9]
- ext: [.sh]
- include:
- - os: windows-latest
- python-version: 3.9
- ext: .ps1
- steps:
- - uses: actions/checkout@v2
- - name: Setup Python
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip flake8 pytest pytest-cov
- pip install -r requirements.txt
- - name: Make configuration for tests
- env:
- REDDIT_TOKEN: ${{ secrets.REDDIT_TEST_TOKEN }}
- run: |
- ./devscripts/configure${{ matrix.ext }}
- - name: Lint with flake8
- run: |
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- - name: Test with pytest
- run: |
- pytest -m 'not slow' --verbose --cov=./bdfr/ --cov-report term:skip-covered --cov-report html
-
- - name: Upload coverage report
- uses: actions/upload-artifact@v2
- with:
- name: coverage_report
- path: htmlcov/
|