Skip to content

Commit

Permalink
Use zsh as shell for macOS-specific job.
Browse files Browse the repository at this point in the history
This is primarily for running integration tests in zsh.
  • Loading branch information
mitchell-as committed Nov 13, 2023
1 parent 24ecbdc commit 99f8e80
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ jobs:

# === OS Specific Job (runs on each OS) ===
os_specific:
name: ${{ matrix.platform }}
name: ${{ matrix.sys.os }}
timeout-minutes: 90
strategy:
matrix:
go-version:
- 1.20.x
platform:
- ubuntu-20.04
- macos-11
- windows-2019
sys:
- {os: ubuntu-20.04, shell: bash}
- {os: macos-11, shell: zsh}
- {os: windows-2019, shell: bash}
fail-fast: false
runs-on: ${{ matrix.platform }}
runs-on: ${{ matrix.sys.os }}
env:
ACTIVESTATE_CI: true
ACTIVESTATE_CLI_DISABLE_RUNTIME: true
SHELL: bash
SHELL: ${{ matrix.sys.shell }}
GITHUB_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: ${{ github.ref }}-${{ github.event_name }}-${{ matrix.platform }}
group: ${{ github.ref }}-${{ github.event_name }}-${{ matrix.sys.os }}
cancel-in-progress: true

# === OS Specific Steps ===
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:

- # === Setup ===
name: Setup
shell: bash
shell: ${{ matrix.sys.shell }}
run: |
bin=$(pwd)/.github/deps/${{ runner.os }}/bin
echo "Adding $bin to PATH"
Expand All @@ -108,24 +108,24 @@ jobs:
- # == Setup macOS ==
name: Setup (macOS)
shell: bash
shell: ${{ matrix.sys.shell }}
run: brew install fish
if: runner.os == 'macOS'

- # === Install Deps ===
name: Install Deps
shell: bash
shell: ${{ matrix.sys.shell }}
run: state run install-deps

- # === Preprocess ===
name: Preprocess
shell: bash
shell: ${{ matrix.sys.shell }}
timeout-minutes: 3
run: state run preprocess -v

- # === Parallel Tasks ===
name: Parallel Tasks
shell: bash
shell: ${{ matrix.sys.shell }}
timeout-minutes: 15
run: |
export PATH="$(pwd)/.github/deps/${{ runner.os }}/bin:$PATH"
Expand Down Expand Up @@ -172,43 +172,43 @@ jobs:
- # === Unit Tests ===
name: Unit Tests
id: unit_tests
shell: bash
shell: ${{ matrix.sys.shell }}
run: parallelize results Unit-Tests | gotestfmt -hide empty-packages
continue-on-error: ${{ github.event_name != 'schedule' }}

- # === "Build: CLI" ===
name: "Build: CLI"
shell: bash
shell: ${{ matrix.sys.shell }}
run: parallelize results Build-CLI

- # === "Build: Service" ===
name: "Build: Service"
shell: bash
shell: ${{ matrix.sys.shell }}
run: parallelize results Build-Service

- # === "Build: Installer" ===
name: "Build: Installer"
shell: bash
shell: ${{ matrix.sys.shell }}
run: parallelize results Build-Installer

- # === "Build: Remote Installer" ===
name: "Build: Remote Installer"
shell: bash
shell: ${{ matrix.sys.shell }}
run: parallelize results Build-Remote-Installer

- # === "Build: Install Scripts" ===
name: "Build: Install Scripts"
shell: bash
shell: ${{ matrix.sys.shell }}
run: parallelize results Build-Install-Scripts

- # === "Build: Executor" ===
name: "Build: Executor"
shell: bash
shell: ${{ matrix.sys.shell }}
run: parallelize results Build-Executor

- # === Prepare Windows Cert ===
name: Prepare Windows Cert
shell: bash
shell: ${{ matrix.sys.shell }}
if: runner.os == 'Windows'
run: |
echo $MSI_CERT_BASE64 | base64 --decode > Cert.p12
Expand All @@ -217,7 +217,7 @@ jobs:

- # === Sign Binaries (Windows only) ===
name: Sign Binaries (Windows only)
shell: bash
shell: ${{ matrix.sys.shell }}
if: runner.os == 'Windows' && contains(fromJSON('["refs/heads/beta", "refs/heads/release", "refs/heads/LTS"]'), github.ref)
run: |
export PATH=/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/10.0.16299.0/x86/:$PATH
Expand All @@ -244,12 +244,12 @@ jobs:

- # === Generate Update ===
name: Generate Update
shell: bash
shell: ${{ matrix.sys.shell }}
run: state run generate-update

- # === Generate Remote Install Deployment ==
name: Generate Remote Install Deployment
shell: bash
shell: ${{ matrix.sys.shell }}
run: state run generate-remote-install-deployment

- # === Configure AWS credentials ==
Expand All @@ -264,7 +264,7 @@ jobs:
- # === Deploy for Integration Tests # NEVER run this against production branches. This is meant for PR deployments. ===
name: Deploy for Integration Tests # NEVER run this against production branches. This is meant for PR deployments.
if: "!contains(fromJSON('[\"refs/heads/beta\", \"refs/heads/release\", \"refs/heads/LTS\"]'), github.ref)"
shell: bash
shell: ${{ matrix.sys.shell }}
run: |
if [ "$GITHUB_EVENT_NAME" != "schedule" ]; then
set +e
Expand All @@ -289,7 +289,7 @@ jobs:
name: Integration Tests
id: integration_tests
if: "!contains(fromJSON('[\"refs/heads/beta\", \"refs/heads/release\", \"refs/heads/LTS\"]'), github.ref)"
shell: bash
shell: ${{ matrix.sys.shell }}
run: |
if [ "$GITHUB_EVENT_NAME" != "schedule" ]; then
LABELS="${{ join(github.event.pull_request.labels.*.name, ',') }}"
Expand Down Expand Up @@ -337,7 +337,7 @@ jobs:
- # === Fail If Unscheduled Unit Tests Failed (Expand 'Unit Tests' above for more information) ===
name: Fail If Unscheduled Unit Tests Failed
if: github.event_name != 'schedule' && steps.unit_tests.outcome == 'failure'
shell: bash
shell: ${{ matrix.sys.shell }}
run: exit 1

- # === Notify Slack of Nightly Integration Test Failures ===
Expand Down Expand Up @@ -367,7 +367,7 @@ jobs:
"type": "section",
"text": {
"type": "plain_text",
"text": "Select the '${{ matrix.platform }}' job and expand 'Integration Tests' to inspect the failures."
"text": "Select the '${{ matrix.sys.os }}' job and expand 'Integration Tests' to inspect the failures."
}
}
]
Expand All @@ -379,14 +379,14 @@ jobs:
- # === Fail If Nightly Integration Tests Failed (Expand 'Integration Tests' above for more information) ===
name: Fail If Nightly Integration Tests Failed
if: github.event_name == 'schedule' && steps.integration_tests.outcome == 'failure'
shell: bash
shell: ${{ matrix.sys.shell }}
run: exit 1

- # === Upload Session Artifacts ===
name: Upload Session Artifacts
uses: actions/upload-artifact@v2
with:
name: session-build-${{ matrix.platform }}
name: session-build-${{ matrix.sys.os }}
path: build/

# === Deploy job (runs once with combined artifacts from OS specific job) ===
Expand Down

0 comments on commit 99f8e80

Please sign in to comment.