Skip to content

chore: Separate installer CI tests #1

chore: Separate installer CI tests

chore: Separate installer CI tests #1

Workflow file for this run

name: installer
on:
pull_request:
branches:
- master
jobs:
changes:
runs-on: ubuntu-22.04
outputs:
sh: ${{ steps.filter.outputs.sh }}
ps1: ${{ steps.filter.outputs.ps1 }}
permissions:
contents: read
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- id: filter
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd
with:
filters: |
sh:
- 'assets/scripts/install.sh'
ps1:
- 'assets/scripts/install.ps1'
misspell:
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: reviewdog/action-misspell@06d6a480724fa783c220081bbc22336a78dbbe82
with:
locale: US
test-installer-macos:
needs: changes
runs-on: macos-11
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: test-install.sh-local
if: ${{ needs.changes.outputs.sh == 'true' }}
run: |
rm -f bin/chezmoi
sh assets/scripts/install.sh -d
bin/chezmoi --version
- name: test-install.sh-url
if: ${{ needs.changes.outputs.sh == 'true' }}
run: |
rm -f bin/chezmoi
sh -c "$(curl -fsLS https://raw.githubusercontent.com/twpayne/chezmoi/${{ github.event.pull_request.head.sha }}/assets/scripts/install.sh)" -d
bin/chezmoi --version
- name: test-install.ps1-local
if: ${{ needs.changes.outputs.ps1 == 'true' }}
shell: pwsh
run: |
if (Test-Path -Path bin/chezmoi) { Remove-Item -Force bin/chezmoi }
assets/scripts/install.ps1 -d
bin/chezmoi --version
- name: test-install.ps1-url
if: ${{ needs.changes.outputs.ps1 == 'true' }}
shell: pwsh
run: |
if (Test-Path -Path bin/chezmoi) { Remove-Item -Force bin/chezmoi }
iex "&{$(irm 'https://raw.githubusercontent.com/twpayne/chezmoi/${{ github.event.pull_request.head.sha }}/assets/scripts/install.ps1')} -d"
bin/chezmoi --version
test-installer-ubuntu:
needs: changes
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: test-install.sh-local
if: ${{ needs.changes.outputs.sh == 'true' }}
run: |
rm -f bin/chezmoi
sh assets/scripts/install.sh -d
bin/chezmoi --version
- name: test-install.sh-url
if: ${{ needs.changes.outputs.sh == 'true' }}
run: |
rm -f bin/chezmoi
sh -c "$(curl -fsLS https://raw.githubusercontent.com/twpayne/chezmoi/${{ github.event.pull_request.head.sha }}/assets/scripts/install.sh)" -d
bin/chezmoi --version
- name: test-install.ps1-local
if: ${{ needs.changes.outputs.ps1 == 'true' }}
shell: pwsh
run: |
if (Test-Path -Path bin/chezmoi) { Remove-Item -Force bin/chezmoi }
assets/scripts/install.ps1 -d
bin/chezmoi --version
- name: test-install.ps1-url
if: ${{ needs.changes.outputs.ps1 == 'true' }}
shell: pwsh
run: |
if (Test-Path -Path bin/chezmoi) { Remove-Item -Force bin/chezmoi }
iex "&{$(irm 'https://raw.githubusercontent.com/twpayne/chezmoi/${{ github.event.pull_request.head.sha }}/assets/scripts/install.ps1')} -d"
bin/chezmoi --version
test-installer-windows:
needs: changes
runs-on: windows-2022
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: test-install.sh-local
if: ${{ needs.changes.outputs.sh == 'true' }}
shell: bash
run: |
rm -f bin/chezmoi.exe
sh assets/scripts/install.sh -d
bin/chezmoi.exe --version
- name: test-install.sh-url
if: ${{ needs.changes.outputs.sh == 'true' }}
shell: bash
run: |
rm -f bin/chezmoi.exe
sh -c "$(curl -fsLS https://raw.githubusercontent.com/twpayne/chezmoi/${{ github.event.pull_request.head.sha }}/assets/scripts/install.sh)" -d
bin/chezmoi.exe --version
- name: test-install.ps1-local
if: ${{ needs.changes.outputs.ps1 == 'true' }}
shell: pwsh
run: |
if (Test-Path -Path bin/chezmoi.exe) { Remove-Item -Force bin/chezmoi.exe }
assets/scripts/install.ps1 -d
bin/chezmoi.exe --version
- name: test-install.ps1-url
if: ${{ needs.changes.outputs.ps1 == 'true' }}
shell: pwsh
run: |
if (Test-Path -Path bin/chezmoi.exe) { Remove-Item -Force bin/chezmoi.exe }
iex "&{$(irm 'https://raw.githubusercontent.com/twpayne/chezmoi/${{ github.event.pull_request.head.sha }}/assets/scripts/install.ps1')} -d"
bin/chezmoi.exe --version