🎥 Make videos programmatically with React
update python version and update path test
Alex Fernandezf0410d58f9ee
diff --git a/.github/workflows/push.yml b/.github/workflows/push.ymlindex ba67cf34c8..1f9863a091 100644--- a/.github/workflows/push.yml+++ b/.github/workflows/push.yml@@ -153,7 +153,7 @@ jobs:- name: Setup Pythonuses: actions/setup-python@v4with:- python-version: "3.9"+ python-version: "3.11"- run: pip install pylint boto3 pytest- run: |corepack enablediff --git a/packages/it-tests/src/monorepo/python-package.test.ts b/packages/it-tests/src/monorepo/python-package.test.tsindex b0f6bca098..79f9d2d2f1 100644--- a/packages/it-tests/src/monorepo/python-package.test.ts+++ b/packages/it-tests/src/monorepo/python-package.test.ts@@ -30,55 +30,68 @@ test("Set the right version for pytest", () => {});test("Python package should create the same renderMedia payload as normal Lambda package", async () => {- const pythonOutput = execSync("pytest -rP ./tests/test_render_client.py", {- cwd: path.join(process.cwd(), "..", "lambda-python"),- });- const output = pythonOutput.toString().split("\n");- console.log(output);- const toParse = output[10];- const nativeVersion = await LambdaInternals.makeLambdaRenderMediaPayload({- region: "us-east-1",- composition: "react-svg",- functionName: "remotion-render",- serveUrl: "testbed",- codec: "h264",- inputProps: {- hi: "there",- },- });- console.log("nativeVersion");- console.log(nativeVersion);- const jsonOutput = toParse.substring(0, toParse.lastIndexOf("}") + 1);- console.log(jsonOutput);- const parsedJson = JSON.parse(jsonOutput);+ const cwd = path.join(process.cwd(), "..", "lambda-python");+ console.log("cwd", cwd);+ try {+ const pythonOutput = execSync("pytest -rP tests/test_render_client.py", {+ cwd,+ });+ const output = pythonOutput.toString().split("\n");+ console.log(output);+ const toParse = output[10];+ const nativeVersion = await LambdaInternals.makeLambdaRenderMediaPayload({+ region: "us-east-1",+ composition: "react-svg",+ functionName: "remotion-render",+ serveUrl: "testbed",+ codec: "h264",+ inputProps: {+ hi: "there",+ },+ });+ console.log("nativeVersion");+ console.log(nativeVersion);+ const jsonOutput = toParse.substring(0, toParse.lastIndexOf("}") + 1);+ console.log(jsonOutput);+ const parsedJson = JSON.parse(jsonOutput);- expect(- removeUndefined({- ...parsedJson,- type: "start",- })- ).toEqual(removeUndefined(nativeVersion));+ expect(+ removeUndefined({+ ...parsedJson,+ type: "start",+ })+ ).toEqual(removeUndefined(nativeVersion));+ } catch (error) {+ console.error(error);+ }});test("Python package should create the same progress payload as normal Lambda package", async () => {- const pythonOutput = execSync(- "pytest -rP ./tests/test_get_render_progress_client.py",- {- cwd: path.join(process.cwd(), "..", "lambda-python"),- }- );- const output = pythonOutput.toString().split("\n");- console.log(output);- const toParse = output[10];- const nativeVersion = LambdaInternals.getRenderProgressPayload({- region: "us-east-1",- functionName: "remotion-render",- bucketName: "remotion-render",- renderId: "abcdef",- });- const jsonOutput = toParse.substring(0, toParse.lastIndexOf("}") + 1);- const parsedJson = JSON.parse(jsonOutput);- expect(parsedJson).toEqual({ ...nativeVersion, s3OutputProvider: null });+ const cwd = path.join(process.cwd(), "..", "lambda-python");+ console.log("cwd", cwd);++ try {+ const pythonOutput = execSync(+ "pytest -rP tests/test_get_render_progress_client.py",+ {+ cwd,+ }+ );+ const output = pythonOutput.toString().split("\n");+ console.log(output);+ const toParse = output[10];+ const nativeVersion = LambdaInternals.getRenderProgressPayload({+ region: "us-east-1",+ functionName: "remotion-render",+ bucketName: "remotion-render",+ renderId: "abcdef",+ });+ const jsonOutput = toParse.substring(0, toParse.lastIndexOf("}") + 1);+ const parsedJson = JSON.parse(jsonOutput);+ expect(parsedJson).toEqual({ ...nativeVersion, s3OutputProvider: null });+ } catch (err) {+ console.error(err);+ }});const removeUndefined = (data: unknown) => {diff --git a/packages/lambda-python/tests/test_render_client.py b/packages/lambda-python/tests/test_render_client.pyindex eb3b5ec128..5e1de1c4df 100644--- a/packages/lambda-python/tests/test_render_client.py+++ b/packages/lambda-python/tests/test_render_client.py@@ -3,8 +3,6 @@ from unittest import TestCasefrom remotion_lambda.models import RenderParamsfrom remotion_lambda.remotionclient import RemotionClient-# python -m pip install boto3-class TestRemotionClient(TestCase):def test_remotion_construct_request(self):