Reviewer checklist + Pester v5 unit tests for dependency scripts #32
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - "PSDepend/**" | |
| - "Tests/**" | |
| - "build.ps1" | |
| - "psakeFile.ps1" | |
| - "requirements.psd1" | |
| pull_request: | |
| paths: | |
| - "PSDepend/**" | |
| - "Tests/**" | |
| - "build.ps1" | |
| - "psakeFile.ps1" | |
| - "requirements.psd1" | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macOS-latest ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Bootstrap | |
| shell: pwsh | |
| run: ./build.ps1 -Bootstrap -Task Init | |
| - name: Test | |
| shell: pwsh | |
| run: ./build.ps1 -Task Test | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: testResults-${{ matrix.os }} | |
| path: ./Tests/out/testResults.xml | |
| publish-test-results: | |
| name: Publish Test Results | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| if: ${{ !cancelled() }} | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| files: artifacts/**/*.xml |