mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
### Motivation: This repo contains reusable workflows, intended for use in _other_ repos. Right now, some of these reusable workflows are nested, i.e. some of the YAML files refer to other YAML files in the repo by a relative path. Unfortunately, this makes them currently unusable locally with `act` because of https://github.com/nektos/act/issues/1875. For now, it appears the only workaround is to have these referred to without the local, relative path. ### Modifications: Use the remote syntax for referencing nested workflows. ### Result: Commands like `act -j unit-tests` will work in repos that aren't NIO itself. --------- Co-authored-by: Franz Busch <privat@franz-busch.de>
65 lines
3.1 KiB
YAML
65 lines
3.1 KiB
YAML
name: Unit tests
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
linux_5_8_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux 5.8 Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_5_8_arguments_override:
|
|
type: string
|
|
description: "The arguments passed to swift test in the Linux 5.8 Swift version matrix job."
|
|
default: ""
|
|
linux_5_9_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_5_9_arguments_override:
|
|
type: string
|
|
description: "The arguments passed to swift test in the Linux 5.9 Swift version matrix job."
|
|
default: ""
|
|
linux_5_10_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_5_10_arguments_override:
|
|
type: string
|
|
description: "The arguments passed to swift test in the Linux 5.10 Swift version matrix job."
|
|
default: ""
|
|
linux_nightly_6_0_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_nightly_6_0_arguments_override:
|
|
type: string
|
|
description: "The arguments passed to swift test in the Linux nightly 6.0 Swift version matrix job."
|
|
default: ""
|
|
linux_nightly_main_enabled:
|
|
type: boolean
|
|
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
|
|
default: true
|
|
linux_nightly_main_arguments_override:
|
|
type: string
|
|
description: "The arguments passed to swift test in the Linux nightly main Swift version matrix job."
|
|
default: ""
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Unit tests
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
|
|
with:
|
|
name: "Unit tests"
|
|
matrix_linux_command: "swift test"
|
|
matrix_linux_5_8_enabled: ${{ inputs.linux_5_8_enabled }}
|
|
matrix_linux_5_8_command_override: "swift test ${{ inputs.linux_5_8_arguments_override }}"
|
|
matrix_linux_5_9_enabled: ${{ inputs.linux_5_9_enabled }}
|
|
matrix_linux_5_9_command_override: "swift test ${{ inputs.linux_5_9_arguments_override }}"
|
|
matrix_linux_5_10_enabled: ${{ inputs.linux_5_10_enabled }}
|
|
matrix_linux_5_10_command_override: "swift test ${{ inputs.linux_5_10_arguments_override }}"
|
|
matrix_linux_nightly_6_0_enabled: ${{ inputs.linux_nightly_6_0_enabled }}
|
|
matrix_linux_nightly_6_0_command_override: "swift test ${{ inputs.linux_nightly_6_0_arguments_override }}"
|
|
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }}
|
|
matrix_linux_nightly_main_command_override: "swift test ${{ inputs.linux_nightly_main_arguments_override }}"
|