Lifecycle python support #54
Workflow file for this run
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: CloudFormation GO Plugin CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
env: | |
AWS_DEFAULT_REGION: "us-east-1" | |
AWS_SDK_LOAD_CONFIG: 1 | |
GOPATH: ${{ github.workspace }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.8", "3.9", "3.10", "3.11"] | |
defaults: | |
run: | |
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.21.0' | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
pip install pre-commit | |
pip install --upgrade mypy 'attrs==19.2.0' -r https://raw.githubusercontent.com/aws-cloudformation/aws-cloudformation-rpdk/master/requirements.txt | |
go get ./... | |
go install github.com/go-critic/go-critic/cmd/gocritic@latest | |
go install golang.org/x/tools/cmd/goimports@latest | |
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest | |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 | |
- name: Install plugin | |
run: | | |
pip install . | |
- name: pre-commit checks | |
run: | | |
pre-commit run --all-files |