-
- SSH Key
- Code Climate IDs
- AWS Credentials
- Others (Deployment and Platform)
-
- Python > 3.8.0
- Pipenv
- Node.js
- aws-cdk
Define all project dependencies on Pipfile with all corresponding versions.
Check Pipfile on CI/CD documentation repository for examples.
Make use of pipenv to run all linters and tests to optimize workflow run time. See [scripts section on Pipfile]
- Workflow Triggers
-
Edge and Staging environments
-
On github.event: pull_request
Only on pull request to branches: [feature-test, develop, staging, acceptance] - Linters, Test and Coverage will be triggered
-
On github.event: push
Only on push/merge to branches: [feature-test, develop, staging, acceptance] - Build and Deploy will be triggered
-
-
Production environments
-
On github.event: pull_request
Only on pull request to branches: [main] - Linters, Test and Coverage will be triggered
-
On github.event: push
Only on push/merge to branches: [main] - Manual trigger of Build and Deploy
-
-
_Note: reusable workflows are on main branch (default). See linters-workflow.yml, test-workflow.yml and deployment-workflow.yml for reference.
Reference: Reusing worklows
Check main-workflow.yml for usage.
-
Linters
- Build from runner (Github OS runner: Ubuntu 18.04)
- Setup python
- Set SSH key for cloning dependencies
- Install pipenv
- Cache dependencies to decrease run time
- Install dependencies via pipenv install –dev –deploy
- Run all linters via pipenv run
<linters>
- Build from runner (Github OS runner: Ubuntu 18.04)
-
Test and Coverage
- Build from runner (Github OS runner: Ubuntu 18.04)
- Setup python
- Set SSH key for cloning dependencies
- Install pipenv
- Cache dependencies to decrease run time
- Install dependencies via pipenv install –dev –deploy
- Run pytest via pipenv run
<tests> - Publish code coverage via code climate actions
- Build from runner (Github OS runner: Ubuntu 18.04)
-
Build and Deploy
- Needs both Linters, Test and Coverage to be successful
- Build from runner (Github OS runner: Ubuntu 18.04)
- Setup python
- Set SSH key for cloning dependencies
- Setup node.js
- Install aws-cdk
- Install pipenv
- Cache dependencies to decrease run time
- Install dependencies via pipenv install –dev –deploy
- Deploy to AWS - pipenv run cdk deploy
<args> <context>