|
3 | 3 |
|
4 | 4 | name: CloudFormation Python Plugin CI
|
5 | 5 |
|
6 |
| -on: |
7 |
| - push: |
8 |
| - branches: [ master ] |
9 |
| - pull_request: |
10 |
| - branches: [ master ] |
| 6 | +on: [push, pull_request] |
11 | 7 |
|
12 | 8 | jobs:
|
13 | 9 | 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: |
14 | 20 | env:
|
15 | 21 | AWS_DEFAULT_REGION: us-east-1
|
16 |
| - runs-on: ubuntu-latest |
| 22 | + runs-on: ${{ matrix.os }} |
17 | 23 | strategy:
|
18 | 24 | 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 ] |
20 | 27 | steps:
|
21 |
| - - uses: actions/checkout@v2 |
| 28 | + - uses: actions/checkout@v3 |
22 | 29 | - name: Set up Python ${{ matrix.python }}
|
23 |
| - uses: actions/setup-python@v2 |
| 30 | + uses: actions/setup-python@v4 |
24 | 31 | with:
|
25 | 32 | python-version: ${{ matrix.python }}
|
| 33 | + cache: pip |
26 | 34 | - name: Install dependencies
|
27 | 35 | run: |
|
28 | 36 | pip install --upgrade mypy 'attrs==19.2.0' -r https://raw.githubusercontent.com/aws-cloudformation/aws-cloudformation-rpdk/master/requirements.txt
|
29 | 37 | - name: Install both plugin and support lib
|
30 | 38 | run: |
|
31 | 39 | 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') }} |
32 | 44 | - name: pre-commit checks
|
33 | 45 | run: |
|
34 | 46 | pre-commit run --all-files
|
|
0 commit comments