To run the tests or type checks, you'd first have to install the development
dependencies. This can be done with
pipenv
:
pipenv install -d
Tests are invoked using pytest
framework:
pytest
Note that for the tests to run successfully, you'd have to define the following environment variables:
- For App Store Connect:
And one of eithert
export TEST_APPLE_KEY_IDENTIFIER=... # Key ID export TEST_APPLE_ISSUER_ID=... # Issued ID
export TEST_APPLE_PRIVATE_KEY_PATH=... # Path to private key in .p8 format export TEST_APPLE_PRIVATE_KEY_CONTENT=... # Content of .p8 private key
- For Google Play:
And one of either
export TEST_GCLOUD_PACKAGE_NAME=... # Package name (Ex: com.google.example)'
export TEST_GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_PATH=... # Path to gcloud service account creedentials with `JSON` key type export TEST_GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_CONTENT=... # Content of gcloud service account creedentials with `JSON` key type
Those can be obtained from App Store Connect -> Users and Access -> Keys. For more information follow Apple's official documentation: Creating API Keys for App Store Connect API.
Static type checks are done using mypy
:
MYPYPATH=stubs mypy src/codemagic