-
Notifications
You must be signed in to change notification settings - Fork 31
50 lines (47 loc) · 1.7 KB
/
pr-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# 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-20.04
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.19.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.50.1
- name: Install plugin
run: |
pip install .
- name: pre-commit checks
run: |
pre-commit run --all-files