Skip to content

Added automated integration tests runs on github (requires approval) #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 7, 2024

Conversation

mbfreder
Copy link
Contributor

Issue #, if available:

Description of changes:

  • Added a Github workflow to run integrations tests on every PR.
  • Used environments approval workflow to only run the tests when someone on the team approves it (excluding the person that sent the PR).

Tests:
In order to test, we need to create a dummy PR and verify the following:

  • An approval is required to run the workflow
  • The workflow successfully runs when someone approves it.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Member

@roger-zhangg roger-zhangg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mbfreder mbfreder requested a review from valerena February 22, 2024 18:10
environment:
name: prod
steps:
- uses: actions/checkout@v3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine most of the examples out there use @v3, but @v4 is the latest version available, and it avoids this warning that you can see in your runs:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

- name: allows us to build arm64 images
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: run integration tests
run: sudo make integ-tests-with-docker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we (or why do we) need to run it with sudo ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work without it. I ran into some permissions issue when I tried. Even on my dev desktop I have to use it.

make integ-tests
make[1]: Entering directory `/local/home/mbfreder/Tooling/aws-lambda-runtime-interface-emulator'
python3 -m venv .venv
Error: [Errno 13] Permission denied: '/local/home/mbfreder/Tooling/aws-lambda-runtime-interface-emulator/.venv/bin/activate.csh'

@mbfreder mbfreder requested a review from valerena February 23, 2024 19:48
@mbfreder
Copy link
Contributor Author

I ran some tests on my fork and can confirm that the workflow doesn't run on the main repo.

@valerena valerena merged commit d5d7505 into aws:develop Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants