Skip to content
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

Feature: Add GitHub action workflow #3

Merged
merged 9 commits into from
Mar 27, 2024
Merged

Conversation

maxhoheiser
Copy link
Member

Add a GitHub action workflow, that installs required dependencies, starts a Localstack container, deploys the infrastructure and runs the pytest

@maxhoheiser maxhoheiser added the enhancement New feature or request label Mar 19, 2024
@maxhoheiser maxhoheiser requested a review from joe4dev March 19, 2024 10:57
@maxhoheiser maxhoheiser self-assigned this Mar 19, 2024
@maxhoheiser maxhoheiser marked this pull request as ready for review March 19, 2024 10:58
Copy link

@joe4dev joe4dev left a comment

Choose a reason for hiding this comment

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

It looks like the workflow is failing with the error TypeError: type of argument db_name must be str; got NoneType instead

Is this waiting for a dependent PR?

schedule:
# “At 00:00 on Sunday.”
- cron: "0 0 * * 0"
workflow_dispatch:
Copy link

Choose a reason for hiding this comment

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

not needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

deleted in: c7bb4b9

LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}

- name: Deploy using CDK
run: |
Copy link

Choose a reason for hiding this comment

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

Consider invoking the make targets here

Copy link

Choose a reason for hiding this comment

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

but that makes it a bit trickier to control the exit codes. Chaining with && \ instead of newlines would do it

cdklocal deploy KinesisFirehoseRedshiftStack2 --require-approval never

- name: List the resources
run: |
Copy link

Choose a reason for hiding this comment

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

e.g., make list_resources

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed in: d590f14

awslocal redshift describe-clusters

- name: Run pytests
run: |
Copy link

Choose a reason for hiding this comment

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

make test

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed in: 50721fc

@maxhoheiser maxhoheiser force-pushed the feature/github-action branch from 88aa04b to 6b5bb4f Compare March 24, 2024 22:27
@maxhoheiser maxhoheiser force-pushed the feature/github-action branch from 8dd4c6a to d590f14 Compare March 25, 2024 08:21
Even if this exposes secrets and config variables, since they should only be mock variables used for local testing it is not a security risk. For production always use a github actions environment with secrets and variables.
@HarshCasper HarshCasper merged commit f4aba6d into main Mar 27, 2024
1 check passed
@joe4dev joe4dev deleted the feature/github-action branch March 27, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants