Merge pull request #215 from xeptagondev/unified #12
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
name: Test Services | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '**' # matches every branch | |
- '!develop' | |
- '!main' # excludes master | |
paths: | |
- backend/** | |
- web/** | |
# - libs/** | |
- .github/workflows/test-service* | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-east-1 | |
jobs: | |
deploy: | |
name: test deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build, tag, and push the image to Amazon ECR | |
id: build-image | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
ECR_REPOSITORY: carbon-services | |
IMAGE_TAG: ${{ github.head_ref || github.ref_name }} | |
run: | | |
# Build a docker container and push it to ECR | |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f backend/services/Dockerfile . | |
echo "Pushing image to ECR..." | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" | |
# automated-api-tests: | |
# runs-on: ubuntu-latest | |
# needs: [deploy] | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Install Postman CLI | |
# run: | | |
# curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh | |
# - name: Login to Postman CLI | |
# run: postman login --with-api-key ${{ secrets.POSTMAN_API_KEY }} | |
# - name: Run User Create Tests | |
# if: always() | |
# run: | | |
# postman collection run "20428472-45dd524a-c260-44f4-b9c9-5f164db2264d" -e "20428472-778eb1c8-aac1-4484-a217-bcfd9a8d0df0" -d ./testing/api/user_onboarding_company4.csv | |
# - name: Run User Password Reset Tests | |
# if: always() | |
# run: | | |
# postman collection run "24647866-ba48ade2-732f-40c5-a304-509b44389ff6" -e "20428472-778eb1c8-aac1-4484-a217-bcfd9a8d0df0" -d ./testing/api/reset_password_3.csv | |
# - name: Run User View Tests | |
# if: always() | |
# run: | | |
# postman collection run "20428472-a9ecb4af-70a2-4997-a478-e554138ec3ea" -e "20428472-778eb1c8-aac1-4484-a217-bcfd9a8d0df0" -d ./testing/api/view_user_company4.csv | |
# - name: Run Programme Create Tests | |
# if: always() | |
# run: | | |
# postman collection run "24716950-471a5534-87f8-482d-93e2-6613e15d55e0" -e "20428472-778eb1c8-aac1-4484-a217-bcfd9a8d0df0" -d ./testing/api/create_project_7.csv | |
# - name: Run Programme Authorisation and Credit Transfer Tests | |
# if: always() | |
# run: | | |
# postman collection run "20428472-140d1d13-d387-4952-b956-a1a5ff7b01af" -e "20428472-778eb1c8-aac1-4484-a217-bcfd9a8d0df0" -d ./testing/api/credit_transfer_1.csv | |
# - name: Run Programme Certification and Certification Revocation Tests | |
# if: always() | |
# run: | | |
# postman collection run "20428472-d4e57d08-53ad-42a5-ba0e-3e85f449a1ed" -e "20428472-778eb1c8-aac1-4484-a217-bcfd9a8d0df0" -d ./testing/api/credit_transfer_certify_1.csv | |