1- ---
21# Continous Integration
32name : ci
43
87 build :
98 runs-on : ubuntu-latest
109 steps :
10+ - uses : actions/checkout@v4
11+ with :
12+ fetch-depth : 0
1113 - uses : actions/setup-python@v5
1214 with :
1315 python-version : 3.9
16+ - uses : actions/setup-node@v4
17+ with :
18+ node-version : 20
19+ cache : ' npm'
20+ - name : Install Dependencies
21+ run : |
22+ pip install --upgrade pip setuptools
23+ pip install pre-commit
24+ npm ci --include=optional
25+ npm run build
26+ - name : Run Linting
27+ run : |
28+ pre-commit run --all-files --verbose
1429 os_build :
1530 runs-on : ${{ matrix.os }}
1631 strategy :
1732 matrix :
1833 os :
1934 - ubuntu-latest
20- - macos-12 # Later versions of ARM-based macOS runners fail because the hypervisor framework required for Docker is not supported
21- python : [ "3.8 ", "3.9 ", "3.10", "3.11 "]
35+ - macos-13
36+ python : [ "3.10 ", "3.11 ", "3.12 "]
2237 node : [ 20 ]
2338 env :
2439 SAM_CLI_TELEMETRY : " 0"
@@ -30,14 +45,14 @@ jobs:
3045 PIP_LOG_FILE : /tmp/pip.log
3146 HOMEBREW_NO_AUTO_UPDATE : 1
3247 steps :
33- - uses : actions/checkout@v3
48+ - uses : actions/checkout@v4
3449 - name : Update Homebrew and save docker version
3550 if : runner.os == 'macOS'
3651 run : |
3752 brew tap homebrew/core
3853 cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/d/docker.rb" > .github/brew-formulae
3954 - name : Configure Homebrew docker cache files
40- uses : actions/cache@v3
55+ uses : actions/cache@v4
4156 if : runner.os == 'macOS'
4257 with :
4358 path : |
@@ -51,18 +66,12 @@ jobs:
5166 run : |
5267 brew install docker --cask
5368 brew install colima
54- # Docker engine is no longer available because of licensing
55- # Alternative Colima is part of the github macOS runner
56- # SAM v1.47.0+ needed for colima support, unable to use Python 3.6
5769 colima start
58- # Ensure colima is configured for later user
5970 echo "DOCKER_HOST=unix://$HOME/.colima/default/docker.sock" >> $GITHUB_ENV
60- # Verify Docker
6171 docker ps
6272 docker --version
63- # Verify colima
6473 colima status
65- - uses : actions/setup-python@v4
74+ - uses : actions/setup-python@v5
6675 with :
6776 python-version : ${{ matrix.python }}
6877 cache : ' pip'
@@ -73,18 +82,17 @@ jobs:
7382 pip install --upgrade pip
7483 pip install --upgrade setuptools wheel aws-sam-cli -r https://raw.githubusercontent.com/aws-cloudformation/cloudformation-cli/master/requirements.txt
7584 pip install .
76- - uses : actions/setup-node@v3
85+ - uses : actions/setup-node@v4
7786 with :
7887 node-version : ${{ matrix.node }}
7988 cache : ' npm'
8089 - name : Install Dependencies Node.js
8190 id : install_nodejs
82- # Touch needed because of https://github.com/aws/aws-cli/issues/2639
8391 run : |
8492 npm ci --include=optional
8593 find ./node_modules/* -mtime +10950 -exec touch {} \;
8694 npm run build
87- - uses : actions/cache@v3
95+ - uses : actions/cache@v4
8896 with :
8997 path : ~/.cache/pre-commit/
9098 key : ${{ matrix.os }}-${{ env.pythonLocation }}${{ hashFiles('.pre-commit-config.yaml') }}
@@ -100,9 +108,9 @@ jobs:
100108 bash codecov.sh -f coverage/ts/coverage-final.json -F unittests -n codecov-typescript
101109 - name : Upload Coverage Artifacts
102110 id : upload_coverage
103- uses : actions/upload-artifact@v3
111+ uses : actions/upload-artifact@v4
104112 with :
105- name : coverage
113+ name : coverage-${{ matrix.os }}-py${{ matrix.python }}
106114 path : coverage/
107115 - name : Run Integration Tests
108116 id : integration_testing
@@ -140,7 +148,7 @@ jobs:
140148 - name : Upload Debug Artifacts
141149 id : upload_logs
142150 if : failure()
143- uses : actions/upload-artifact@v3
151+ uses : actions/upload-artifact@v4
144152 with :
145- name : debug-logs
153+ name : debug-logs-${{ matrix.os }}-py${{ matrix.python }}
146154 path : ${{ env.LOG_PATH }}
0 commit comments