提交 c38737eb authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Move coverage upload to combine job

上级 ee2fe2cb
...@@ -114,17 +114,16 @@ jobs: ...@@ -114,17 +114,16 @@ jobs:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
auto-update-conda: true auto-update-conda: true
- name: Get unique id - name: Create matrix id
id: unique-id id: matrix-id
env: env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }} MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: | run: |
echo $STRATEGY_CONTEXT echo $MATRIX_CONTEXT
export JOB_ID=`echo $STRATEGY_CONTEXT | md5sum` export MATRIX_ID=`echo $MATRIX_CONTEXT | md5sum | cut -c 1-32`
echo $JOB_ID echo $MATRIX_ID
echo "::set-output name=id::$JOB_ID" echo "::set-output name=id::$MATRIX_ID"
# Setup
- name: Install dependencies - name: Install dependencies
shell: bash -l {0} shell: bash -l {0}
run: | run: |
...@@ -143,8 +142,9 @@ jobs: ...@@ -143,8 +142,9 @@ jobs:
if [[ $FAST_COMPILE == "1" ]]; then export THEANO_FLAGS=$THEANO_FLAGS,mode=FAST_COMPILE; fi if [[ $FAST_COMPILE == "1" ]]; then export THEANO_FLAGS=$THEANO_FLAGS,mode=FAST_COMPILE; fi
if [[ $FLOAT32 == "1" ]]; then export THEANO_FLAGS=$THEANO_FLAGS,floatX=float32; fi if [[ $FLOAT32 == "1" ]]; then export THEANO_FLAGS=$THEANO_FLAGS,floatX=float32; fi
export THEANO_FLAGS=$THEANO_FLAGS,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc.cxxflags=-pipe export THEANO_FLAGS=$THEANO_FLAGS,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc.cxxflags=-pipe
python -m pytest -x -r A --verbose --runslow --cov=theano/ --cov-report=xml --no-cov-on-fail $PART python -m pytest -x -r A --verbose --runslow --cov=theano/ --cov-report=xml:coverage/coverage-${MATRIX_ID}.xml --no-cov-on-fail $PART
env: env:
MATRIX_ID: ${{ steps.matrix-id.outputs.id }}
MKL_THREADING_LAYER: GNU MKL_THREADING_LAYER: GNU
MKL_NUM_THREADS: 1 MKL_NUM_THREADS: 1
OMP_NUM_THREADS: 1 OMP_NUM_THREADS: 1
...@@ -152,18 +152,41 @@ jobs: ...@@ -152,18 +152,41 @@ jobs:
FAST_COMPILE: ${{ matrix.fast-compile }} FAST_COMPILE: ${{ matrix.fast-compile }}
FLOAT32: ${{ matrix.float32 }} FLOAT32: ${{ matrix.float32 }}
- name: Upload coverage to Codecov - name: Upload coverage file
uses: codecov/codecov-action@v1 uses: actions/upload-artifact@v2
with: with:
fail_ci_if_error: true name: coverage
name: "py${{ matrix.python-version }}: ${{ matrix.part }}" path: coverage/coverage-${{ steps.matrix-id.outputs.id }}.xml
combine: combine:
if: ${{ always() }} if: ${{ always() }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "All tests" name: "All tests and coverage"
needs: [changes, style, test] needs: [changes, style, test]
steps: steps:
- name: Check build matrix status - name: Check build matrix status
if: ${{ needs.changes.outputs.changes == 'true' && (needs.style.result != 'success' || needs.test.result != 'success') }} if: ${{ needs.changes.outputs.changes == 'true' && (needs.style.result != 'success' || needs.test.result != 'success') }}
run: exit 1 run: exit 1
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install -U coverage>=5.1 coveralls
- name: Download coverage file
uses: actions/download-artifact@v2
with:
name: coverage
path: coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
directory: ./coverage/
fail_ci_if_error: true
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论