Skip to content

Commit 23555a4

Browse files
committed
test: run integ tests upon pull request approval
1 parent 405ede4 commit 23555a4

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/workflows/pr-approval.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: PR Approval
2+
3+
on:
4+
pull_request_review:
5+
types: [submitted]
6+
workflow_dispatch:
7+
jobs:
8+
integ_tests:
9+
if: github.event.review.state == 'approved'
10+
name: Run Integration Tests
11+
uses: aws-actions/amazon-ecs-deploy-task-definition/.github/workflows/test-workflow.yml@integ-tests
12+
with:
13+
call_local_action: 'true'
14+
secrets:
15+
account_id: ${{ secrets.AWS_ACCOUNT_ID }}

.mergify.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ queue_rules:
55
- status-success=Run Unit Tests
66
- status-success=Semantic Pull Request
77
- status-success=Analyze (javascript)
8+
- status-success=Run Integration Tests
89

910
pull_request_rules:
1011
- name: Automatically merge on CI success and review approval
@@ -16,6 +17,7 @@ pull_request_rules:
1617
- status-success=Run Unit Tests
1718
- status-success=Semantic Pull Request
1819
- status-success=Analyze (javascript)
20+
- status-success=Run Integration Tests
1921
- label!=work-in-progress
2022
- -title~=(WIP|wip)
2123
- -merged

task-definition.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"containerDefinitions": [
3+
{
4+
"entryPoint": [
5+
"sh",
6+
"-c"
7+
],
8+
"portMappings": [
9+
{
10+
"hostPort": 80,
11+
"protocol": "tcp",
12+
"containerPort": 80
13+
}
14+
],
15+
"command": [
16+
"/bin/sh -c \"echo '<html> <head> <title>Amazon ECS Sample App</title> <style>body {margin-top: 40px; background-color: #333;} </style> </head><body> <div style=color:white;text-align:center> <h1>Amazon ECS Sample App</h1> <h2>Congratulations!</h2> <p>Your application is now running on a container in Amazon ECS.</p> </div></body></html>' > /usr/local/apache2/htdocs/index.html && httpd-foreground\""
17+
],
18+
"cpu": 256,
19+
"memoryReservation": 512,
20+
"image": "httpd:2.4",
21+
"essential": true,
22+
"name": "sample-app"
23+
}
24+
],
25+
"memory": "512",
26+
"family": "github-actions-deploy-task-def-integ-tests",
27+
"requiresCompatibilities": [
28+
"FARGATE"
29+
],
30+
"networkMode": "awsvpc",
31+
"cpu": "256"
32+
}

0 commit comments

Comments
 (0)