@@ -17,33 +17,34 @@ jobs:
1717 lint :
1818 runs-on : ubuntu-latest
1919 steps :
20- - uses : cisagov/setup-env-github-action@develop
21- - uses : actions/checkout@v2
20+ - id : setup-env
21+ uses : cisagov/setup-env-github-action@develop
22+ - uses : actions/checkout@v3
2223 - id : setup-python
23- uses : actions/setup-python@v2
24+ uses : actions/setup-python@v3
2425 with :
25- python-version : 3.9
26- # GO_VERSION and GOCACHE are used by the cache task, so the Go
27- # installation must happen before that.
26+ python-version : " 3.10 "
27+ # We need the Go version and Go cache location for the actions/cache step,
28+ # so the Go installation must happen before that.
2829 - uses : actions/setup-go@v2
2930 with :
30- go-version : ' 1.16'
31+ go-version : " 1.16"
3132 - name : Store installed Go version
33+ id : go-version
3234 run : |
33- echo "GO_VERSION="\
34- "$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')" \
35- >> $GITHUB_ENV
35+ echo "::set-output name=version::"\
36+ "$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')"
3637 - name : Lookup Go cache directory
3738 id : go-cache
3839 run : |
3940 echo "::set-output name=dir::$(go env GOCACHE)"
40- - uses : actions/cache@v2
41+ - uses : actions/cache@v3
4142 env :
4243 BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
4344 py${{ steps.setup-python.outputs.python-version }}-\
44- go${{ env.GO_VERSION }}-\
45- packer${{ env.PACKER_VERSION }}-\
46- tf${{ env.TERRAFORM_VERSION }}-"
45+ go${{ steps.go-version.outputs.version }}-\
46+ packer${{ steps.setup- env.outputs.packer-version }}-\
47+ tf${{ steps.setup- env.outputs.terraform-version }}-"
4748 with :
4849 # Note that the .terraform directory IS NOT included in the
4950 # cache because if we were caching, then we would need to use
6970 - name : Setup curl cache
7071 run : mkdir -p ${{ env.CURL_CACHE_DIR }}
7172 - name : Install Packer
73+ env :
74+ PACKER_VERSION : ${{ steps.setup-env.outputs.packer-version }}
7275 run : |
7376 PACKER_ZIP="packer_${PACKER_VERSION}_linux_amd64.zip"
7477 curl --output ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
@@ -81,20 +84,17 @@ jobs:
8184 sudo ln -s /opt/packer/packer /usr/local/bin/packer
8285 - uses : hashicorp/setup-terraform@v1
8386 with :
84- terraform_version : ${{ env.TERRAFORM_VERSION }}
87+ terraform_version : ${{ steps.setup- env.outputs.terraform-version }}
8588 - name : Install shfmt
86- run : go install mvdan.cc/sh/v3/cmd/shfmt@${SHFMT_VERSION}
89+ env :
90+ PACKAGE_URL : mvdan.cc/sh/v3/cmd/shfmt
91+ PACKAGE_VERSION : ${{ steps.setup-env.outputs.shfmt-version }}
92+ run : go install ${PACKAGE_URL}@${PACKAGE_VERSION}
8793 - name : Install Terraform-docs
88- run : |
89- go install \
90- github.com/terraform-docs/terraform-docs@${TERRAFORM_DOCS_VERSION}
91- - name : Find and initialize Terraform directories
92- run : |
93- for path in $(find . -not \( -type d -name ".terraform" -prune \) \
94- -type f -iname "*.tf" -exec dirname "{}" \; | sort -u); do \
95- echo "Initializing '$path'..."; \
96- terraform init -input=false -backend=false "$path"; \
97- done
94+ env :
95+ PACKAGE_URL : github.com/terraform-docs/terraform-docs
96+ PACKAGE_VERSION : ${{ steps.setup-env.outputs.terraform-docs-version }}
97+ run : go install ${PACKAGE_URL}@${PACKAGE_VERSION}
9898 - name : Install dependencies
9999 run : |
100100 python -m pip install --upgrade pip
@@ -109,19 +109,21 @@ jobs:
109109 test :
110110 runs-on : ubuntu-latest
111111 strategy :
112+ fail-fast : false
112113 matrix :
113114 python-version :
114- - 3.6
115- - 3.7
116- - 3.8
117- - 3.9
115+ - " 3.6"
116+ - " 3.7"
117+ - " 3.8"
118+ - " 3.9"
119+ - " 3.10"
118120 steps :
119- - uses : actions/checkout@v2
121+ - uses : actions/checkout@v3
120122 - id : setup-python
121- uses : actions/setup-python@v2
123+ uses : actions/setup-python@v3
122124 with :
123125 python-version : ${{ matrix.python-version }}
124- - uses : actions/cache@v2
126+ - uses : actions/cache@v3
125127 env :
126128 BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
127129 py${{ steps.setup-python.outputs.python-version }}-"
@@ -159,12 +161,12 @@ jobs:
159161 runs-on : ubuntu-latest
160162 needs : test
161163 steps :
162- - uses : actions/checkout@v2
164+ - uses : actions/checkout@v3
163165 - id : setup-python
164- uses : actions/setup-python@v2
166+ uses : actions/setup-python@v3
165167 with :
166- python-version : 3.9
167- - uses : actions/cache@v2
168+ python-version : " 3.10 "
169+ - uses : actions/cache@v3
168170 env :
169171 BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
170172 py${{ steps.setup-python.outputs.python-version }}-"
@@ -194,19 +196,21 @@ jobs:
194196 runs-on : ubuntu-latest
195197 needs : [lint, test]
196198 strategy :
199+ fail-fast : false
197200 matrix :
198201 python-version :
199- - 3.6
200- - 3.7
201- - 3.8
202- - 3.9
202+ - " 3.6"
203+ - " 3.7"
204+ - " 3.8"
205+ - " 3.9"
206+ - " 3.10"
203207 steps :
204- - uses : actions/checkout@v2
208+ - uses : actions/checkout@v3
205209 - id : setup-python
206- uses : actions/setup-python@v2
210+ uses : actions/setup-python@v3
207211 with :
208212 python-version : ${{ matrix.python-version }}
209- - uses : actions/cache@v2
213+ - uses : actions/cache@v3
210214 env :
211215 BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
212216 py${{ steps.setup-python.outputs.python-version }}-"
@@ -220,12 +224,12 @@ jobs:
220224 ${{ hashFiles('setup.py') }}"
221225 restore-keys : |
222226 ${{ env.BASE_CACHE_KEY }}
223- - name : Install dependencies
227+ - name : Install build dependencies
224228 run : |
225- python -m pip install --upgrade pip wheel
226- pip install --upgrade --requirement requirements.txt
229+ python -m pip install --upgrade pip setuptools wheel
230+ python -m pip install --upgrade build
227231 - name : Build artifacts
228- run : python3 setup.py sdist bdist_wheel
232+ run : python -m build
229233 - name : Upload artifacts
230234 uses : actions/upload-artifact@v2
231235 with :
0 commit comments