awslabs / amplify-video

An open source Category Plugin for the AWS Amplify-CLI that makes it easy to deploy live and file based streaming video services and integrate them into your Amplify applications.
https://www.npmjs.com/package/amplify-category-video
Apache License 2.0
267 stars 56 forks source link

Add integration tests pipeline and headless mode for CI/CD #192

Closed nathanagez closed 3 years ago

nathanagez commented 3 years ago

Issue #186

This pull request add the following:

Testing workflow

When tests are triggered, jest will firstly run the script located here: scripts/setup.js thanks to globalSetup inside jest.config.js file. The setup.js file is responsible to init a new amplify project (amplify init) then add the amplify-video resources thanks to the headless mode then the tests will start. When the tests have been ran the script located here scripts/teardown.js will start to destroy all previously created resources, thanks to globalTeardown also inside jest.config.js file.

How to write new scripts and add them to the testing workflow ?

I am working on a wiki update that will add a new section on how to use the headless mode with amplify-video. This, will include how to write custom scripts for infrastructure permutations and how to edit the setup.js file.

https://github.com/nathanagez/amplify-video/wiki/Tests

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

nathanagez commented 3 years ago

@wizage @smp we now need the test account to test that Github Action works as expected, works correctly on my forked repository

wizage commented 3 years ago

Closing in favor of other pull requests