Skip to content

Commit

Permalink
Merge pull request #5 from getcft/release-1.0
Browse files Browse the repository at this point in the history
Adding CloudFormation Testing and Badging and Upgrading Python
  • Loading branch information
nethacker authored May 26, 2024
2 parents 9018a5d + be8fedf commit 371552f
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 29 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cloudformation-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CloudFormation Validation

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: CloudFormation Template Validation
run: |
pip install awscli
aws cloudformation validate-template --template-body file://serverless-cf-template.yml --region us-east-1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: CloudFormation Linter
run: |
pip install cfn-lint
cfn-lint -I serverless-cf-template.yml
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# serverless-cf-template
[![Build Status](https://travis-ci.org/getcft/aws-serverless-cf-template.svg?branch=master)](https://travis-ci.org/getcft/aws-serverless-cf-template)
[![CloudFormation Validation](https://github.com/getcft/aws-serverless-cf-template/actions/workflows/cloudformation-validation.yml/badge.svg)](https://github.com/getcft/aws-serverless-cf-template/actions/workflows/cloudformation-validation.yml)

AWS CloudFormation template creating a Serverless application using AWS Lambda and API Gateway

Expand Down
2 changes: 1 addition & 1 deletion lambda-app/lambda.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018 Phil Chen All rights reserved.
# Copyright (c) 2024 Phil Chen All rights reserved.
# This work is licensed under the terms of the MIT license.

# Lambda that returns JSON
Expand Down
Binary file modified lambda-app/lambda.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions serverless-cf-template.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright [2018] [Phil Chen]
# Copyright [2024] [Phil Chen]

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,7 +54,7 @@ Resources:
Handler: lambda.endpoint
Role: !Sub 'arn:aws:iam::${AWS::AccountId}:role/serverless'
Timeout: '30'
Runtime: 'python2.7'
Runtime: 'python3.11'
ServerlessRestApi:
Type: 'AWS::ApiGateway::RestApi'
Properties:
Expand Down

0 comments on commit 371552f

Please sign in to comment.