Skip to content

[pull] master from PowerShell:master #19

[pull] master from PowerShell:master

[pull] master from PowerShell:master #19

Workflow file for this run

name: macOS-CI
run-name: "${{ github.ref_name }} - ${{ github.run_number }}"
on:
push:
branches:
- master
- release/**
paths:
- "**"
- "!.github/ISSUE_TEMPLATE/**"
- "!.dependabot/config.yml"
- "!.pipelines/**"
- "!test/perf/**"
pull_request:
branches:
- master
- release/**
# Path filters for PRs need to go into the changes job
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ contains(github.ref, 'merge')}}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
FORCE_FEATURE: 'False'
FORCE_PACKAGE: 'False'
HOMEBREW_NO_ANALYTICS: 1
NUGET_KEY: none
POWERSHELL_TELEMETRY_OPTOUT: 1
__SuppressAnsiEscapeSequences: 1
nugetMultiFeedWarnLevel: none
system_debug: 'false'
jobs:
changes:
name: Change Detection
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
source: ${{ steps.filter.outputs.source }}
steps:
- name: checkout
uses: actions/[email protected]
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: json
filters: .github/action-filters.yml
- name: Capture outputs
run: |
"source: ${{ steps.filter.outputs.source }}"
"github: ${{ steps.filter.outputs.github }}"
"tools: ${{ steps.filter.outputs.tools }}"
"props: ${{ steps.filter.outputs.props }}"
"tests: ${{ steps.filter.outputs.tests }}"
"mainSource: ${{ steps.filter.outputs.mainSource }}"
"buildModule: ${{ steps.filter.outputs.buildModule }}"
shell: pwsh
ci_build:
name: Build PowerShell
runs-on: macos-latest
needs: changes
if: ${{ needs.changes.outputs.source == 'true' }}
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 1000
- name: Build
uses: "./.github/actions/build/ci"
macos_test_unelevated_ci:
name: macos Unelevated CI
needs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' }}
runs-on: macos-latest
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 1000
- name: macOS Unelevated CI
uses: "./.github/actions/test/nix"
with:
purpose: UnelevatedPesterTests
tagSet: CI
macos_test_elevated_ci:
name: macOS Elevated CI
needs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' }}
runs-on: macos-latest
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 1000
- name: macOS Elevated CI
uses: "./.github/actions/test/nix"
with:
purpose: ElevatedPesterTests
tagSet: CI
macos_test_unelevated_others:
name: macOS Unelevated Others
needs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' }}
runs-on: macos-latest
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 1000
- name: macOS Unelevated Others
uses: "./.github/actions/test/nix"
with:
purpose: UnelevatedPesterTests
tagSet: Others
macos_test_elevated_others:
name: macOS Elevated Others
needs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' }}
runs-on: macos-latest
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 1000
- name: macOS Elevated Others
uses: "./.github/actions/test/nix"
with:
purpose: ElevatedPesterTests
tagSet: Others
verify_xunit:
name: Verify xUnit test results
needs:
- ci_build
- changes
if: ${{ needs.changes.outputs.source == 'true' }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 1000
- name: Verify xUnit test results
uses: "./.github/actions/test/verify_xunit"
PackageMac-macos_packaging:
name: macOS packaging (bootstrap only)
needs:
- changes
if: ${{ needs.changes.outputs.source == 'true' }}
runs-on:
- macos-latest
steps:
- name: checkout
uses: actions/[email protected]
- name: Bootstrap packaging
if: success() || failure()
run: |-
import-module ./build.psm1
start-psbootstrap -Scenario package
shell: pwsh
ready_to_merge:
name: macos ready to merge
needs:
- verify_xunit
- PackageMac-macos_packaging
- macos_test_elevated_ci
- macos_test_elevated_others
- macos_test_unelevated_ci
- macos_test_unelevated_others
if: always()
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@master
with:
needs_context: ${{ toJson(needs) }}