mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
51bf2ecf27
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: Test Jellyfin-Kodi
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
PR_TRIGGERED: ${{ github.event_name == 'pull_request' && github.repository == 'jellyfin/jellyfin-kodi' }}
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
py_version: ['2.7', '3.9']
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python ${{ matrix.py_version }}
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: ${{ matrix.py_version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -r requirements-dev.txt
|
|
|
|
- name: Lint with flake8
|
|
run: |
|
|
# stop the build if there are Python syntax errors or undefined names
|
|
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --output-file=flake8.output
|
|
cat flake8.output
|
|
|
|
- name: Test with Coverage
|
|
run: |
|
|
coverage run
|
|
coverage xml
|
|
coverage report
|
|
|
|
- name: Upload coverage
|
|
uses: codecov/codecov-action@v3.1.0
|
|
if: ${{ matrix.py_version == '3.9' }}
|
|
|
|
- name: Publish Test Atrifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
retention-days: 14
|
|
name: ${{ matrix.py_version }}-test-results
|
|
path: |
|
|
flake8.output
|
|
test.xml
|
|
coverage.xml
|