github.com/aws-cloudformation/cloudformation-cli-go-plugin@v1.2.0/.github/workflows/pr-ci.yml (about) 1 # This workflow will install Python dependencies, run tests and lint with a single version of Python 2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions 3 4 name: CloudFormation GO Plugin CI 5 6 on: 7 push: 8 branches: [ master ] 9 pull_request: 10 branches: [ master ] 11 12 jobs: 13 build: 14 env: 15 AWS_DEFAULT_REGION: "us-east-1" 16 AWS_SDK_LOAD_CONFIG: 1 17 GOPATH: ${{ github.workspace }} 18 runs-on: ubuntu-latest 19 strategy: 20 matrix: 21 python: [3.7, 3.8, 3.9] 22 defaults: 23 run: 24 working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} 25 steps: 26 - uses: actions/checkout@v3 27 with: 28 path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} 29 - uses: actions/setup-go@v3 30 with: 31 go-version: '>=1.19.0' 32 - name: Set up Python ${{ matrix.python }} 33 uses: actions/setup-python@v2 34 with: 35 python-version: ${{ matrix.python }} 36 - name: Install dependencies 37 run: | 38 pip install pre-commit 39 pip install --upgrade mypy 'attrs==19.2.0' -r https://raw.githubusercontent.com/aws-cloudformation/aws-cloudformation-rpdk/master/requirements.txt 40 go get ./... 41 go install github.com/go-critic/go-critic/cmd/gocritic@latest 42 go install golang.org/x/tools/cmd/goimports@latest 43 go install github.com/fzipp/gocyclo/cmd/gocyclo@latest 44 curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1 45 - name: Install plugin 46 run: | 47 pip install . 48 - name: pre-commit checks 49 run: | 50 pre-commit run --all-files