Skip to content

Commit

Permalink
chore(ci): test matrix improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Dec 4, 2023
1 parent c668693 commit ddc17c9
Showing 1 changed file with 127 additions and 83 deletions.
210 changes: 127 additions & 83 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,22 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-action:
name: "Test: Install"
name: "Test: Install (${{ matrix.label }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13-xlarge]
os: [ubuntu-latest, macos-13-xlarge, macos-latest, windows-latest]
label: ["Ubuntu", "macOS (M1)", "macOS (x86)", "Windows"]
include:
- os: ubuntu-latest
label: "Ubuntu"
- os: macos-13-xlarge
label: "macOS (M1)"
- os: macos-latest
label: "macOS (x86)"
- os: windows-latest
label: "Windows"

steps:
- name: Harden Runner
Expand All @@ -176,12 +186,21 @@ jobs:
run: echo "${{ steps.test-action.outputs.path }}"

test-path:
name: "Test: Path"
name: "Test: Path (${{ matrix.label }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13-xlarge]
label: ["Ubuntu", "macOS (M1)", "macOS (x86)", "Windows"]
include:
- os: ubuntu-latest
label: "Ubuntu"
- os: macos-13-xlarge
label: "macOS (M1)"
- os: macos-latest
label: "macOS (x86)"
- os: windows-latest
label: "Windows"

steps:
- name: Harden Runner
Expand All @@ -204,14 +223,116 @@ jobs:
- name: "Test: Binary on PATH"
run: buildless --help

test-smoketest:
name: "Test: Smoke Test (${{ matrix.label }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
label: ["Ubuntu", "macOS (M1)", "macOS (x86)", "Windows"]
include:
- os: ubuntu-latest
label: "Ubuntu"
- os: macos-13-xlarge
label: "macOS (M1)"
- os: macos-latest
label: "macOS (x86)"
- os: windows-latest
label: "Windows"

steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit

- name: "Setup: Checkout"
id: checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: "Test: Buildless Action"
id: test-action
uses: ./
with:
agent: false

- name: "Test: Print Output"
id: output
run: echo "${{ steps.test-action.outputs.path }}"

- name: "Test: Help"
run: buildless --help

- name: "Test: Version"
run: buildless --version

- name: "Test: Show"
run: buildless --verbose=true show

- name: "Test: Status"
run: buildless --verbose=true status

- name: "Test: Agent Status"
run: buildless --verbose=true status

- name: "Test: Legal"
run: buildless legal

test-noagent:
name: "Test: No Agent (${{ matrix.label }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
label: ["Ubuntu", "macOS (M1)", "macOS (x86)", "Windows"]
include:
- os: ubuntu-latest
label: "Ubuntu"
- os: macos-13-xlarge
label: "macOS (M1)"
- os: macos-latest
label: "macOS (x86)"
- os: windows-latest
label: "Windows"

steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit

- name: "Setup: Checkout"
id: checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: "Test: Buildless Action"
id: test-action
uses: ./
with:
agent: false

- name: "Test: Print Output"
id: output
run: echo "${{ steps.test-action.outputs.path }}"

- name: "Test: Agent Not Installed"
run: test "Agent is not installed." = "$(buildless agent status)"

test-agent:
name: "Test: Agent"
name: "Test: Agent (${{ matrix.label }})"
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13-xlarge]
label: ["Ubuntu", "macOS (M1)", "macOS (x86)"]
include:
- os: ubuntu-latest
label: "Ubuntu"
- os: macos-13-xlarge
label: "macOS (M1)"
- os: macos-latest
label: "macOS (x86)"

steps:
- name: Harden Runner
Expand Down Expand Up @@ -349,83 +470,6 @@ jobs:
ps aux | pgrep buildless
fi
test-noagent:
name: "Test: No Agent"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13-xlarge]

steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit

- name: "Setup: Checkout"
id: checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: "Test: Buildless Action"
id: test-action
uses: ./
with:
agent: false

- name: "Test: Print Output"
id: output
run: echo "${{ steps.test-action.outputs.path }}"

- name: "Test: Agent Not Installed"
run: test "Agent is not installed." = "$(buildless agent status)"

test-smoketest:
name: "Test: Smoke Test"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13-xlarge]

steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit

- name: "Setup: Checkout"
id: checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: "Test: Buildless Action"
id: test-action
uses: ./
with:
agent: false

- name: "Test: Print Output"
id: output
run: echo "${{ steps.test-action.outputs.path }}"

- name: "Test: Help"
run: buildless --help

- name: "Test: Version"
run: buildless --version

- name: "Test: Show"
run: buildless --verbose=true show

- name: "Test: Status"
run: buildless --verbose=true status

- name: "Test: Agent Status"
run: buildless --verbose=true status

- name: "Test: Legal"
run: buildless legal

check-dist:
name: "Test: Dist"
uses: ./.github/workflows/check.dist.yml
Expand Down

0 comments on commit ddc17c9

Please sign in to comment.