-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update CI scripts #114
Merged
Merged
Update CI scripts #114
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6d053b4
remove old script
andreram 4ae750c
Add deploy script
andreram 1487a5a
Merge branch 'main' into update-ci-scripts
andreram 11b0f8d
minor
andreram deb0a35
Merge branch 'main' into update-ci-scripts
andreram 2b2a294
typo in folder
andreram File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
env: | ||
REGION: us-west-2 | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# Sets up AWS profile. | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.CI_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.CI_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ env.REGION }} | ||
# Install CDK | ||
- name: Install CDK | ||
run: sudo npm install -g [email protected] | ||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
# Build and deploy the backend | ||
- name: Build backend | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
dotnet tool install -g Amazon.Lambda.Tools | ||
chmod 700 deployBackend.sh | ||
./deployBackend.sh -c -e test || exit 1 | ||
# Install frontend packages | ||
- name: Install packages | ||
run: | | ||
sudo npm install -g yarn | ||
cd Frontend | ||
yarn install | ||
# Run E2E tests | ||
- name: Cypress tests | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
working-directory: ./Frontend | ||
browser: chrome | ||
headless: true | ||
start: yarn start || exit 1 | ||
wait-on: 'http://localhost:3000' | ||
deploy: | ||
name: Deploy | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# Sets up AWS profile. | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.PROD_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.PROD_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ env.REGION }} | ||
# Install CDK | ||
- name: Install CDK | ||
run: sudo npm install -g [email protected] | ||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
# Build and deploy to production | ||
- name: Build and deploy | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
dotnet tool install -g Amazon.Lambda.Tools | ||
chmod 700 deploy.sh | ||
./deploy.sh -e prod || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately there's no way to reuse scripts: actions/starter-workflows#245