BeanProjects / cloud-platform

MIT License
0 stars 0 forks source link

[CC] Add GitHub Actions workflow for build and test #4

Closed peterbean410 closed 1 year ago

peterbean410 commented 1 year ago

Define a Build - Test - Push workflow having three jobs:

  1. branch: This job gets the name of the branch being pushed or dispatched to and sets an environment variable based on the branch name (production for master, sandbox for other branches).

  2. test: This job runs e2e tests for the project using Go and the go test command.

  3. build-ami: This job builds an Amazon Machine Image (AMI) for production (if the push is to the master branch) using Packer.

All jobs are configured to run on every push to the repository and also can be triggered manually from the GitHub Actions page using the workflow_dispatch event.

Environments

Both environments have the same following secrets:

Link to Pull Request

Link to Pull Request