Eliminate try! / fatalError; handle unknown Status-es. (#54) #220
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Test | |
on: [push] | |
jobs: | |
build: | |
runs-on: windows-2022 | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Visual Studio Development Environment | |
uses: compnerd/gha-setup-vsdevenv@main | |
- name: Install Swift | |
uses: compnerd/gha-setup-swift@main | |
with: | |
branch: development | |
tag: DEVELOPMENT-SNAPSHOT-2023-05-20-a | |
# long file path support needed for building tests, the dependencies | |
# that SPM checks out end up having paths which are too long. this can't | |
# be locally set bc the SPM checkouts aren't part of this repo | |
- name: Configure long file path | |
shell: pwsh | |
run: git config --system core.longpaths true | |
- name: Enable crash dump in Registry | |
working-directory: ${{ github.workspace }} | |
shell: pwsh | |
run: | | |
curl -H "Authorization: token ${{ inputs.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v4.raw" -O -L https://api.github.com/repos/thebrowsercompany/infra/contents/resources/windows/ErrorReporting.reg | |
regedit.exe /s ErrorReporting.reg | |
- name: Start WinAppDriver | |
shell: pwsh | |
run: | | |
cmd /c 'START "winappdriver" "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe" "127.0.0.1" "4723"' | |
- name: Build | |
uses: ./.github/actions/windows-run-and-flush | |
with: | |
cmd-exec: swift | |
working-directory: ${{ github.workspace }} | |
cmd-args: "build ${{ runner.debug && '--verbose' || '' }} --disable-keychain --build-tests" | |
- name: Test | |
timeout-minutes: 10 | |
uses: ./.github/actions/windows-run-and-flush | |
with: | |
cmd-exec: swift | |
working-directory: ${{ github.workspace }} | |
cmd-args: "test ${{ runner.debug && '--verbose' || '' }} --disable-keychain --skip-build" | |
- name: Take screenshot | |
if: failure() | |
continue-on-error: true | |
shell: pwsh | |
run: | | |
${{ github.workspace }}\scripts\screenshot.ps1 ${{ github.workspace }}\screenshot.png | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: screenshot | |
path: ${{ github.workspace }}\screenshot.png | |
- uses: ./.github/actions/windows-swift-teardown | |
with: | |
working-directory: ${{ github.workspace }} |