File tree Expand file tree Collapse file tree 4 files changed +14
-23
lines changed
Expand file tree Collapse file tree 4 files changed +14
-23
lines changed Original file line number Diff line number Diff line change 1212jobs :
1313 build :
1414 env :
15- AWS_DEFAULT_REGION : us-east-1
15+ AWS_DEFAULT_REGION : " us-east-1"
16+ AWS_SDK_LOAD_CONFIG : 1
17+ GOPATH : ${{ github.workspace }}
1618 runs-on : ubuntu-latest
1719 strategy :
1820 matrix :
19- python : [3.6, 3.7, 3.8]
21+ python : [3.7, 3.8, 3.9]
22+ defaults :
23+ run :
24+ working-directory : ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
2025 steps :
21- - uses : actions/checkout@v2
26+ - uses : actions/checkout@v3
27+ with :
28+ path : ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
2229 - uses : actions/setup-go@v3
2330 with :
2431 go-version : ' >=1.17.0'
3037 run : |
3138 pip install pre-commit
3239 pip install --upgrade mypy 'attrs==19.2.0' -r https://raw.githubusercontent.com/aws-cloudformation/aws-cloudformation-rpdk/master/requirements.txt
40+ go get ./...
3341 go install github.com/go-critic/go-critic/cmd/gocritic@latest
3442 go install golang.org/x/tools/cmd/goimports@latest
3543 go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
Original file line number Diff line number Diff line change @@ -3,10 +3,8 @@ package cfn
33import (
44 "context"
55 "errors"
6- "io/ioutil"
76 "log"
87 "os"
9- "path"
108 "sync"
119 "time"
1210
@@ -103,10 +101,7 @@ func makeEventFunc(h Handler) eventFunc {
103101 logging .SetProviderLogOutput (l )
104102 })
105103 re := newReportErr (m )
106- if err := scrubFiles ("/tmp" ); err != nil {
107- log .Printf ("Error: %v" , err )
108- m .PublishExceptionMetric (time .Now (), event .Action , err )
109- }
104+
110105 handlerFn , cfnErr := router (event .Action , h )
111106 log .Printf ("Handler received the %s action" , event .Action )
112107 if cfnErr != nil {
@@ -145,17 +140,6 @@ func makeEventFunc(h Handler) eventFunc {
145140 }
146141}
147142
148- func scrubFiles (dir string ) error {
149- names , err := ioutil .ReadDir (dir )
150- if err != nil {
151- return err
152- }
153- for _ , entery := range names {
154- os .RemoveAll (path .Join ([]string {dir , entery .Name ()}... ))
155- }
156- return nil
157- }
158-
159143// router decides which handler should be invoked based on the action
160144// It will return a route or an error depending on the action passed in
161145func router (a string , h Handler ) (handlerFunc , cfnerr.Error ) {
Original file line number Diff line number Diff line change 1212from subprocess import PIPE , CalledProcessError , run as subprocess_run # nosec
1313from tempfile import TemporaryFile
1414
15- from . import __version__
1615from .resolver import translate_type
1716from .utils import safe_reserved , validate_path
18- from .version import check_version
1917
2018LOG = logging .getLogger (__name__ )
2119
Original file line number Diff line number Diff line change @@ -51,8 +51,9 @@ def find_version(*file_paths):
5151 "Topic :: Software Development :: Code Generators" ,
5252 "Operating System :: OS Independent" ,
5353 "Programming Language :: Python :: 3 :: Only" ,
54- "Programming Language :: Python :: 3.6" ,
5554 "Programming Language :: Python :: 3.7" ,
55+ "Programming Language :: Python :: 3.8" ,
56+ "Programming Language :: Python :: 3.9" ,
5657 ],
5758 keywords = "Amazon Web Services AWS CloudFormation" ,
5859)
You can’t perform that action at this time.
0 commit comments