Skip to content

Checks

Checks #172

Workflow file for this run

name: Checks
on:
pull_request:
schedule:
- cron: 0 20 * * 0
workflow_dispatch:
jobs:
run_check:
strategy:
matrix:
os: [windows-latest, windows-2019]
verbose: ["-Verbose", ""]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Scoop
uses: MinoruSekine/setup-scoop@v3
- name: Run script (1st time)
run: ./WindowsEnvSetup.ps1 ${{ matrix.verbose }}
shell: pwsh
- name: Run script (2nd time to check idempotency)
run: ./WindowsEnvSetup.ps1 ${{ matrix.verbose }}
shell: pwsh
- name: Run script via proxy script
run: ./WindowsEnvSetup.cmd ${{ matrix.verbose }}
shell: cmd
lint:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install PSScriptAnalyzer
run: |
Install-Module -Name PSScriptAnalyzer -Force
shell: pwsh
- name: Check syntax of PowerShell script
run: |
Invoke-ScriptAnalyzer WindowsEnvSetup.ps1
shell: pwsh