mirror of
https://github.com/microsoft/FLAML.git
synced 2026-02-09 02:09:16 +08:00
code coverage (#79)
* add codecov.yml
* change tests to test
* condition
* windows
* install coverage
* remove conditions
* revert remove conditions
* check build failure
* code coverage
* Revert "check build failure"
This reverts commit bc06b3f961.
* del codecov.yml
Co-authored-by: Chi Wang (MSR) <chiw@microsoft.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
This commit is contained in:
6
.github/workflows/python-package.yml
vendored
6
.github/workflows/python-package.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
push:
|
||||
branches: ['main']
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
branches: ['main']
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -49,13 +49,17 @@ jobs:
|
||||
# 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
|
||||
- name: Test with pytest
|
||||
if: ${{ matrix.python-version != '3.7' || matrix.os == 'macos-latest' }}
|
||||
run: |
|
||||
pytest test
|
||||
- name: Coverage
|
||||
if: ${{ matrix.python-version == '3.7' && matrix.os != 'macos-latest' }}
|
||||
run: |
|
||||
pip install coverage
|
||||
coverage run -a -m pytest test
|
||||
coverage xml
|
||||
- name: Upload coverage to Codecov
|
||||
if: ${{ matrix.python-version == '3.7' && matrix.os != 'macos-latest' }}
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
file: ./coverage.xml
|
||||
|
||||
Reference in New Issue
Block a user