diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..166a387 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build + run: ./scripts/build.sh + - name: Doctor + run: ./scripts/doctor.sh + - name: Platform package tests + run: ./scripts/test-platform-packages.sh + - name: Managed manifest tests + run: ./scripts/test-managed-install.sh + - name: Build validation tests + run: ./scripts/test-build-validation.sh + - name: Install dry run (isolated HOME) + run: | + export HOME="$RUNNER_TEMP/isolated-home" + mkdir -p "$HOME" + ./scripts/install.sh --dry-run --client both --platform linux + + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Build + shell: powershell + run: .\scripts\build.ps1 + - name: Doctor + shell: powershell + run: .\scripts\doctor.ps1 + - name: Platform package tests + shell: powershell + run: .\scripts\test-platform-packages.ps1 + - name: Managed manifest tests + shell: powershell + run: .\scripts\test-managed-install.ps1 + - name: Build validation tests + shell: powershell + run: .\scripts\test-build-validation.ps1 + - name: Install dry run + shell: powershell + # -DryRun performs no writes, so it is safe to run against the runner's + # real profile path. [Environment]::GetFolderPath('UserProfile') reads + # from the Windows profile API on PowerShell 5.1, not $env:USERPROFILE, + # so overriding that variable would not relocate it anyway. + run: .\scripts\install.ps1 -DryRun -Client Both -Platform Windows