|
6 | 6 | branches:
|
7 | 7 | - main
|
8 | 8 | paths-ignore:
|
9 |
| - - '**.md' |
10 |
| - - 'contrib/**' |
11 |
| - - '.github/CODEOWNERS' |
| 9 | + - "**.md" |
| 10 | + - "contrib/**" |
| 11 | + - ".github/CODEOWNERS" |
12 | 12 | pull_request:
|
13 | 13 | branches:
|
14 | 14 | - main
|
15 |
| - paths-ignore: |
16 |
| - - '**.md' |
17 |
| - - 'contrib/**' |
18 |
| - - '.github/CODEOWNERS' |
| 15 | + paths: |
| 16 | + - "**.go" |
| 17 | + - "contrib/packaging/**" |
| 18 | + - "!contrib/hello-finch/**" |
| 19 | + - "!.github/CODEOWNERS" |
| 20 | + workflow_dispatch: |
19 | 21 | permissions:
|
20 | 22 | id-token: write
|
21 | 23 | contents: write
|
@@ -141,154 +143,58 @@ jobs:
|
141 | 143 | go-version-file: go.mod
|
142 | 144 | cache: true
|
143 | 145 | - run: make check-licenses
|
144 |
| - e2e-tests: |
| 146 | + macos-e2e-tests: |
145 | 147 | strategy:
|
146 | 148 | fail-fast: false
|
147 | 149 | matrix:
|
148 |
| - os: |
149 |
| - [ |
150 |
| - [self-hosted, macos, amd64, 13, test], |
151 |
| - [self-hosted, macos, amd64, 14, test], |
152 |
| - [self-hosted, macos, arm64, 13, test], |
153 |
| - [self-hosted, macos, arm64, 14, test], |
154 |
| - ] |
155 |
| - test-command: ['test-e2e-vm-serial', 'test-e2e-container'] |
156 |
| - runs-on: ${{ matrix.os }} |
157 |
| - steps: |
158 |
| - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
159 |
| - with: |
160 |
| - # We need to get all the git tags to make version injection work. See VERSION in Makefile for more detail. |
161 |
| - fetch-depth: 0 |
162 |
| - persist-credentials: false |
163 |
| - submodules: recursive |
164 |
| - - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 |
165 |
| - with: |
166 |
| - go-version-file: go.mod |
167 |
| - cache: true |
168 |
| - - name: Set output variables |
169 |
| - id: vars |
170 |
| - run: | |
171 |
| - has_creds=${{ (github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name) && github.actor != 'dependabot[bot]' }} |
172 |
| - echo "has_creds=$has_creds" >> $GITHUB_OUTPUT |
173 |
| - - name: configure aws credentials |
174 |
| - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 |
175 |
| - if: ${{ steps.vars.outputs.has_creds == true }} |
176 |
| - with: |
177 |
| - role-to-assume: ${{ secrets.ROLE }} |
178 |
| - role-session-name: credhelper-test |
179 |
| - aws-region: ${{ secrets.REGION }} |
180 |
| - - name: Clean up previous files |
181 |
| - run: | |
182 |
| - sudo rm -rf /opt/finch |
183 |
| - sudo rm -rf ~/.finch |
184 |
| - sudo rm -rf ./_output |
185 |
| - if pgrep '^qemu-system'; then |
186 |
| - sudo pkill '^qemu-system' |
187 |
| - fi |
188 |
| - if pgrep '^socket_vmnet'; then |
189 |
| - sudo pkill '^socket_vmnet' |
190 |
| - fi |
191 |
| - - name: Install Rosetta 2 |
192 |
| - run: echo "A" | softwareupdate --install-rosetta || true |
193 |
| - - run: brew install lz4 automake autoconf libtool yq |
194 |
| - shell: zsh {0} |
195 |
| - - name: Build project |
196 |
| - run: | |
197 |
| - export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" |
198 |
| - make |
199 |
| - shell: zsh {0} |
200 |
| - - run: | |
201 |
| - git status |
202 |
| - git clean -f -d |
203 |
| - REGISTRY=${{ steps.vars.outputs.has_creds == true && env.REGISTRY || '' }} make ${{ matrix.test-command }} |
204 |
| - shell: zsh {0} |
| 150 | + version: ["13", "14"] |
| 151 | + test-command: ["test-e2e-vm-serial", "test-e2e-container"] |
| 152 | + arch: ["X64", "arm64"] |
| 153 | + runner-type: ["test"] |
| 154 | + uses: ./.github/workflows/e2e-macos.yaml |
| 155 | + secrets: inherit |
| 156 | + with: |
| 157 | + arch: ${{ matrix.arch }} |
| 158 | + version: ${{ matrix.version }} |
| 159 | + runner-type: ${{ matrix.runner-type }} |
| 160 | + test-command: ${{ matrix.test-command }} |
205 | 161 | windows-e2e-tests:
|
206 | 162 | strategy:
|
207 | 163 | fail-fast: false
|
208 | 164 | matrix:
|
209 |
| - os: [[self-hosted, windows, amd64, test]] |
210 |
| - test-command: ['test-e2e-vm-serial', 'test-e2e-container'] |
211 |
| - runs-on: ${{ matrix.os }} |
212 |
| - timeout-minutes: 180 |
213 |
| - steps: |
214 |
| - - name: Configure git CRLF settings |
215 |
| - run: | |
216 |
| - git config --global core.autocrlf false |
217 |
| - git config --global core.eol lf |
218 |
| - - name: Cleanup previous checkouts |
219 |
| - run: | |
220 |
| - takeown /F C:\actions-runner\_work\finch /R |
221 |
| - Remove-Item C:\actions-runner\_work\finch\finch -Recurse -Force -ErrorAction Ignore |
222 |
| - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
223 |
| - with: |
224 |
| - # We need to get all the git tags to make version injection work. See VERSION in Makefile for more detail. |
225 |
| - fetch-depth: 0 |
226 |
| - persist-credentials: false |
227 |
| - submodules: recursive |
228 |
| - - name: Set output variables |
229 |
| - id: vars |
230 |
| - run: | |
231 |
| - $has_creds="${{ (github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name) && github.actor != 'dependabot[bot]'}}" |
232 |
| - echo "has_creds=$has_creds" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append |
233 |
| - exit 0 # if $has_creds is false, powershell will exit with code 1 and this step will fail |
234 |
| - - name: configure aws credentials |
235 |
| - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 |
236 |
| - if: env.has_creds == 'true' |
237 |
| - with: |
238 |
| - role-to-assume: ${{ secrets.ROLE }} |
239 |
| - role-session-name: credhelper-test |
240 |
| - aws-region: ${{ secrets.REGION }} |
241 |
| - - name: Remove Finch VM |
242 |
| - run: | |
243 |
| - # We want these cleanup commands to always run, ignore errors so the step completes. |
244 |
| - $ErrorActionPreference = 'Ignore' |
245 |
| - taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0" |
246 |
| - wsl --list --verbose |
247 |
| - wsl --shutdown |
248 |
| - wsl --unregister lima-finch |
249 |
| - wsl --list --verbose |
250 |
| - - name: Clean up previous files |
251 |
| - run: | |
252 |
| - Remove-Item C:\Users\Administrator\.finch -Recurse -ErrorAction Ignore |
253 |
| - Remove-Item C:\Users\Administrator\AppData\Local\.finch -Recurse -ErrorAction Ignore |
254 |
| - make clean |
255 |
| - cd deps/finch-core && make clean |
256 |
| - - name: Build project |
257 |
| - run: | |
258 |
| - git status |
259 |
| - make |
260 |
| - - name: Run e2e tests |
261 |
| - run: | |
262 |
| - # set path to use newer ssh version |
263 |
| - $newPath = (";C:\Program Files\Git\bin\;" + "C:\Program Files\Git\usr\bin\;" + "$env:Path") |
264 |
| - $env:Path = $newPath |
265 |
| -
|
266 |
| - # set networking config option to allow for VM/container -> host communication |
267 |
| - echo "[experimental]`nnetworkingMode=mirrored`nhostAddressLoopback=true" > C:\Users\Administrator\.wslconfig |
| 165 | + test-command: ["test-e2e-vm-serial", "test-e2e-container"] |
| 166 | + arch: ["amd64"] |
| 167 | + runner-type: ["test"] |
| 168 | + uses: ./.github/workflows/e2e-windows.yaml |
| 169 | + secrets: inherit |
| 170 | + with: |
| 171 | + arch: ${{ matrix.arch }} |
| 172 | + runner-type: ${{ matrix.runner-type }} |
| 173 | + test-command: ${{ matrix.test-command }} |
| 174 | + linux-e2e-tests: |
| 175 | + strategy: |
| 176 | + fail-fast: false |
| 177 | + matrix: |
| 178 | + os: ["amazonlinux"] |
| 179 | + arch: ["X64", "arm64"] |
| 180 | + version: ["2023", "2"] |
| 181 | + test-command: ["test-e2e-container"] |
| 182 | + runner-type: ["test"] |
| 183 | + uses: ./.github/workflows/e2e-linux.yaml |
| 184 | + secrets: inherit |
| 185 | + with: |
| 186 | + os: ${{ matrix.os }} |
| 187 | + arch: ${{ matrix.arch }} |
| 188 | + version: ${{ matrix.version }} |
| 189 | + runner-type: ${{ matrix.runner-type }} |
| 190 | + test-command: ${{ matrix.test-command }} |
268 | 191 |
|
269 |
| - git status |
270 |
| - git clean -f -d |
271 |
| - make ${{ matrix.test-command }} |
272 |
| - - name: Remove Finch VM and Clean Up Previous Environment |
273 |
| - if: ${{ always() }} |
274 |
| - run: | |
275 |
| - # We want these cleanup commands to always run, ignore errors so the step completes. |
276 |
| - $ErrorActionPreference = 'Ignore' |
277 |
| - taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0" |
278 |
| - wsl --list --verbose |
279 |
| - wsl --shutdown |
280 |
| - wsl --unregister lima-finch |
281 |
| - wsl --list --verbose |
282 |
| - Remove-Item C:\Users\Administrator\AppData\Local\.finch -Recurse |
283 |
| - make clean |
284 |
| - cd deps/finch-core && make clean |
285 |
| - exit 0 # Cleanup may set the exit code e.g. if a file doesn't exist; just ignore |
286 | 192 | mdlint:
|
287 | 193 | runs-on: ubuntu-latest
|
288 | 194 | steps:
|
289 | 195 | - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
290 | 196 | - uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
|
291 | 197 | with:
|
292 |
| - args: '**/*.md' |
| 198 | + args: "**/*.md" |
293 | 199 | # CHANGELOG.md is only updated by release-please bot.
|
294 |
| - ignore: 'CHANGELOG.md' |
| 200 | + ignore: "CHANGELOG.md" |
0 commit comments