Skip to content

Bump pyright from 1.1.315 to 1.1.316 #3561

Bump pyright from 1.1.315 to 1.1.316

Bump pyright from 1.1.315 to 1.1.316 #3561

Workflow file for this run

---
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
# * is a special character in YAML so you have to quote this string
# Run at 1:00 every day
- cron: '0 1 * * *'
workflow_dispatch: {}
# We share Vuforia credentials and therefore Vuforia databases across
# workflows.
# We therefore want to run only one workflow at a time.
concurrency: vuforia_credentials
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
ci_pattern:
- tests/mock_vws/test_query.py::TestContentType
- tests/mock_vws/test_query.py::TestSuccess
- tests/mock_vws/test_query.py::TestIncorrectFields
- tests/mock_vws/test_query.py::TestMaxNumResults
- tests/mock_vws/test_query.py::TestIncludeTargetData
- tests/mock_vws/test_query.py::TestAcceptHeader
- tests/mock_vws/test_query.py::TestActiveFlag
- tests/mock_vws/test_query.py::TestBadImage
- tests/mock_vws/test_query.py::TestMaximumImageFileSize
- tests/mock_vws/test_query.py::TestMaximumImageDimensions
- tests/mock_vws/test_query.py::TestImageFormats
- tests/mock_vws/test_query.py::TestProcessing
- tests/mock_vws/test_query.py::TestUpdate
- tests/mock_vws/test_query.py::TestDeleted
- tests/mock_vws/test_query.py::TestTargetStatusFailed
- tests/mock_vws/test_query.py::TestDateFormats
- tests/mock_vws/test_query.py::TestInactiveProject
- tests/mock_vws/test_add_target.py
- tests/mock_vws/test_authorization_header.py::TestAuthorizationHeader
- tests/mock_vws/test_authorization_header.py::TestMalformed::test_one_part_no_space
- tests/mock_vws/test_authorization_header.py::TestMalformed::test_one_part_with_space
- tests/mock_vws/test_authorization_header.py::TestMalformed::test_missing_signature
- tests/mock_vws/test_authorization_header.py::TestBadKey
- tests/mock_vws/test_content_length.py::TestIncorrect::test_not_integer
- tests/mock_vws/test_content_length.py::TestIncorrect::test_too_large
- tests/mock_vws/test_content_length.py::TestIncorrect::test_too_small
- tests/mock_vws/test_database_summary.py
- tests/mock_vws/test_date_header.py::TestFormat
- tests/mock_vws/test_date_header.py::TestMissing
- tests/mock_vws/test_date_header.py::TestSkewedTime::test_date_out_of_range
- tests/mock_vws/test_date_header.py::TestSkewedTime::test_date_in_range
- tests/mock_vws/test_delete_target.py
- tests/mock_vws/test_get_duplicates.py
- tests/mock_vws/test_get_target.py
- tests/mock_vws/test_invalid_given_id.py
- tests/mock_vws/test_invalid_json.py
- tests/mock_vws/test_target_list.py
- tests/mock_vws/test_target_summary.py
- tests/mock_vws/test_unexpected_json.py
- tests/mock_vws/test_update_target.py::TestActiveFlag
- tests/mock_vws/test_update_target.py::TestApplicationMetadata
- tests/mock_vws/test_update_target.py::TestImage::test_image_valid
- tests/mock_vws/test_update_target.py::TestImage::test_bad_image_format_or_color_space
- tests/mock_vws/test_update_target.py::TestImage::test_corrupted
- tests/mock_vws/test_update_target.py::TestImage::test_image_too_large
- tests/mock_vws/test_update_target.py::TestImage::test_not_base64_encoded_processable
- tests/mock_vws/test_update_target.py::TestImage::test_not_base64_encoded_not_processable
- tests/mock_vws/test_update_target.py::TestImage::test_not_image
- tests/mock_vws/test_update_target.py::TestImage::test_invalid_type
- tests/mock_vws/test_update_target.py::TestImage::test_rating_can_change
- tests/mock_vws/test_update_target.py::TestTargetName
- tests/mock_vws/test_update_target.py::TestUnexpectedData
- tests/mock_vws/test_update_target.py::TestUpdate
- tests/mock_vws/test_update_target.py::TestWidth
- tests/mock_vws/test_update_target.py::TestInactiveProject
- tests/mock_vws/test_requests_mock_usage.py
- tests/mock_vws/test_flask_app_usage.py
- tests/mock_vws/test_docker.py
- README.rst
- docs/source/basic-example.rst
steps:
- uses: actions/checkout@v3
with:
# See https://github.com/codecov/codecov-action/issues/190.
fetch-depth: 2
- name: "Set up Python"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip setuptools wheel
# We use '--ignore-installed' to avoid GitHub's cache which can cause
# issues - we have seen packages from this cache be cause trouble with
# pip-extra-reqs.
python -m pip install --ignore-installed --upgrade --editable .[dev]
- name: "Set secrets file"
run: |
# See the "CI Setup" document for details of how this was set up.
ci/decrypt_secret.sh
tar xvf "${HOME}"/secrets/secrets.tar
python ci/set_secrets_file.py
env:
CI_PATTERN: ${{ matrix.ci_pattern }}
ENCRYPTED_FILE: secrets.tar.gpg
LARGE_SECRET_PASSPHRASE: ${{ secrets.PASSPHRASE_FOR_VUFORIA_SECRETS }}
- name: "Run tests"
run: |
pytest \
-s \
-vvv \
--showlocals \
--exitfirst \
--cov=src/ \
--cov=tests \
--cov-report=xml \
${{ matrix.ci_pattern }}
- name: "Show coverage file"
run: |
# Sometimes we have been sure that we have 100% coverage, but codecov
# says otherwise.
#
# We show the coverage file here to help with debugging.
# https://github.com/VWS-Python/vws-python-mock/issues/708
cat ./coverage.xml
# We run this job on every PR, on every merge to master, and nightly.
# This causes us to hit an issue with Codecov.
#
# We see "Too many uploads to this commit.".
# See https://community.codecov.io/t/too-many-uploads-to-this-commit/2574.
#
# To work around this, we do not upload coverage data on scheduled runs.
# We print the event name here to help with debugging.
- name: "Show event name"
run: |
echo ${{ github.event_name }}
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v3"
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}