Skip to content

Commit 54541d5

Browse files
authored
Chore(CI): update github actions to latest versions, python 3.9, and multi-os (#215)
* Update github actions to latest version and test on all branches/PR * Added default line ending to LF on git checkout * Remove Python 3.10 from testing, fails for macos and windows * added precommit caching and pip caching * Add noop CI job for requirements
1 parent 3d3fbb0 commit 54541d5

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text eol=lf

.github/workflows/pr-ci.yml

+21-9
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,44 @@
33

44
name: CloudFormation Python Plugin CI
55

6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
6+
on: [push, pull_request]
117

128
jobs:
139
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python: [ 3.6, 3.7, 3.8 ]
14+
steps:
15+
- name: Set up Python ${{ matrix.python }}
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: ${{ matrix.python }}
19+
os_build:
1420
env:
1521
AWS_DEFAULT_REGION: us-east-1
16-
runs-on: ubuntu-latest
22+
runs-on: ${{ matrix.os }}
1723
strategy:
1824
matrix:
19-
python: [3.6, 3.7, 3.8]
25+
os: [ubuntu-latest, macos-latest, windows-latest]
26+
python: [ 3.6, 3.7, 3.8, 3.9 ]
2027
steps:
21-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2229
- name: Set up Python ${{ matrix.python }}
23-
uses: actions/setup-python@v2
30+
uses: actions/setup-python@v4
2431
with:
2532
python-version: ${{ matrix.python }}
33+
cache: pip
2634
- name: Install dependencies
2735
run: |
2836
pip install --upgrade mypy 'attrs==19.2.0' -r https://raw.githubusercontent.com/aws-cloudformation/aws-cloudformation-rpdk/master/requirements.txt
2937
- name: Install both plugin and support lib
3038
run: |
3139
pip install . src/
40+
- uses: actions/cache@v3
41+
with:
42+
path: ~/.cache/pre-commit/
43+
key: ${{ matrix.os }}-${{ env.pythonLocation }}${{ hashFiles('.pre-commit-config.yaml') }}
3244
- name: pre-commit checks
3345
run: |
3446
pre-commit run --all-files

0 commit comments

Comments
 (0)