feat: future proof artifact uploads (#37464)
This commit is contained in:
10
.github/workflows/unit-tests.yml
vendored
10
.github/workflows/unit-tests.yml
vendored
@@ -123,26 +123,26 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd test_root/log
|
||||
mv pytest_warnings.json pytest_warnings_${{ matrix.shard_name }}.json
|
||||
mv pytest_warnings.json pytest_warnings_${{ matrix.shard_name }}_${{ matrix.python-version }}_${{ matrix.django-version }}_${{ matrix.mongo-version }}_${{ matrix.os-version }}.json
|
||||
|
||||
- name: save pytest warnings json file
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pytest-warnings-json-${{ matrix.shard_name }}
|
||||
name: pytest-warnings-json-${{ matrix.shard_name }}-${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.mongo-version }}-${{ matrix.os-version }}
|
||||
path: |
|
||||
test_root/log/pytest_warnings*.json
|
||||
overwrite: true
|
||||
|
||||
- name: Renaming coverage data file
|
||||
run: |
|
||||
mv reports/.coverage reports/${{ matrix.shard_name }}.coverage
|
||||
mv reports/.coverage reports/${{ matrix.shard_name }}_${{ matrix.python-version }}_${{ matrix.django-version }}_${{ matrix.mongo-version }}_${{ matrix.os-version }}.coverage
|
||||
|
||||
- name: Upload coverage
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-${{ matrix.shard_name }}
|
||||
path: reports/${{ matrix.shard_name }}.coverage
|
||||
name: coverage-${{ matrix.shard_name }}-${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.mongo-version }}-${{ matrix.os-version }}
|
||||
path: reports/${{ matrix.shard_name }}_${{ matrix.python-version }}_${{ matrix.django-version }}_${{ matrix.mongo-version }}_${{ matrix.os-version }}.coverage
|
||||
overwrite: true
|
||||
|
||||
collect-and-verify:
|
||||
|
||||
@@ -91,7 +91,7 @@ def read_warning_data(dir_path):
|
||||
# TODO(jinder): currently this is hard-coded in, maybe create a constants file with info
|
||||
# THINK(jinder): but creating file for one constant seems overkill
|
||||
warnings_file_name_regex = (
|
||||
r"pytest_warnings_?[\w-]*\.json" # noqa pylint: disable=W1401
|
||||
r"pytest_warnings_?[\w.-]*\.json" # noqa pylint: disable=W1401
|
||||
)
|
||||
|
||||
# iterate through files_in_dir and see if they match our know file name pattern
|
||||
|
||||
Reference in New Issue
Block a user