1- ---
21# Continous Integration
32name : ci
43
@@ -11,14 +10,34 @@ jobs:
1110 - uses : actions/setup-python@v5
1211 with :
1312 python-version : 3.9
13+ - uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+ - name : Set up Python
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : 3.9
20+ - uses : actions/setup-node@v4
21+ with :
22+ node-version : 20
23+ cache : ' npm'
24+ - name : Install Dependencies
25+ run : |
26+ pip install --upgrade pip setuptools
27+ pip install pre-commit
28+ npm ci --include=optional
29+ npm run build
30+ - name : Run Linting
31+ run : |
32+ pre-commit run --all-files --verbose
1433 os_build :
1534 runs-on : ${{ matrix.os }}
1635 strategy :
1736 matrix :
1837 os :
1938 - 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 "]
39+ - macos-13
40+ python : [ "3.10 ", "3.11 ", "3.12 "]
2241 node : [ 20 ]
2342 env :
2443 SAM_CLI_TELEMETRY : " 0"
@@ -30,14 +49,14 @@ jobs:
3049 PIP_LOG_FILE : /tmp/pip.log
3150 HOMEBREW_NO_AUTO_UPDATE : 1
3251 steps :
33- - uses : actions/checkout@v3
52+ - uses : actions/checkout@v4
3453 - name : Update Homebrew and save docker version
3554 if : runner.os == 'macOS'
3655 run : |
3756 brew tap homebrew/core
3857 cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/d/docker.rb" > .github/brew-formulae
3958 - name : Configure Homebrew docker cache files
40- uses : actions/cache@v3
59+ uses : actions/cache@v4
4160 if : runner.os == 'macOS'
4261 with :
4362 path : |
@@ -51,18 +70,12 @@ jobs:
5170 run : |
5271 brew install docker --cask
5372 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
5773 colima start
58- # Ensure colima is configured for later user
5974 echo "DOCKER_HOST=unix://$HOME/.colima/default/docker.sock" >> $GITHUB_ENV
60- # Verify Docker
6175 docker ps
6276 docker --version
63- # Verify colima
6477 colima status
65- - uses : actions/setup-python@v4
78+ - uses : actions/setup-python@v5
6679 with :
6780 python-version : ${{ matrix.python }}
6881 cache : ' pip'
@@ -73,18 +86,17 @@ jobs:
7386 pip install --upgrade pip
7487 pip install --upgrade setuptools wheel aws-sam-cli -r https://raw.githubusercontent.com/aws-cloudformation/cloudformation-cli/master/requirements.txt
7588 pip install .
76- - uses : actions/setup-node@v3
89+ - uses : actions/setup-node@v4
7790 with :
7891 node-version : ${{ matrix.node }}
7992 cache : ' npm'
8093 - name : Install Dependencies Node.js
8194 id : install_nodejs
82- # Touch needed because of https://github.com/aws/aws-cli/issues/2639
8395 run : |
8496 npm ci --include=optional
8597 find ./node_modules/* -mtime +10950 -exec touch {} \;
8698 npm run build
87- - uses : actions/cache@v3
99+ - uses : actions/cache@v4
88100 with :
89101 path : ~/.cache/pre-commit/
90102 key : ${{ matrix.os }}-${{ env.pythonLocation }}${{ hashFiles('.pre-commit-config.yaml') }}
@@ -100,9 +112,9 @@ jobs:
100112 bash codecov.sh -f coverage/ts/coverage-final.json -F unittests -n codecov-typescript
101113 - name : Upload Coverage Artifacts
102114 id : upload_coverage
103- uses : actions/upload-artifact@v3
115+ uses : actions/upload-artifact@v4
104116 with :
105- name : coverage
117+ name : coverage-${{ matrix.os }}-py${{ matrix.python }}
106118 path : coverage/
107119 - name : Run Integration Tests
108120 id : integration_testing
@@ -140,7 +152,7 @@ jobs:
140152 - name : Upload Debug Artifacts
141153 id : upload_logs
142154 if : failure()
143- uses : actions/upload-artifact@v3
155+ uses : actions/upload-artifact@v4
144156 with :
145- name : debug-logs
157+ name : debug-logs-${{ matrix.os }}-py${{ matrix.python }}
146158 path : ${{ env.LOG_PATH }}
0 commit comments