Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Run tests on multiple OSes
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
thgreasi committed Sep 20, 2024
1 parent 762d3bf commit 57aaba8
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: test release
# https://github.com/product-os/flowzone/tree/master/.github/actions
inputs:
json:
description: "JSON stringified object containing all the inputs from the calling workflow"
required: true
secrets:
description: "JSON stringified object containing all the secrets from the calling workflow"
required: true
variables:
description: "JSON stringified object containing all the variables from the calling workflow"
required: true

# --- custom environment
NODE_VERSION:
type: string
default: '20.x'
VERBOSE:
type: string
default: "true"

runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
using: "composite"
steps:
# https://github.com/actions/setup-node#caching-global-packages-data
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: ${{ inputs.NODE_VERSION }}
cache: npm

- name: Test release
shell: bash
run: |
set -ea
[[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]] && set -x
if [[ -e package-lock.json ]] || [[ -e npm-shrinkwrap.json ]]; then
npm ci
else
npm i
fi
npm run build
npm run test
13 changes: 13 additions & 0 deletions .github/workflows/flowzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,16 @@ jobs:
# Workflows in the same org or enterprise can use the inherit keyword to implicitly pass secrets
secrets: inherit
with:
custom_test_matrix: >
{
"os": [
["self-hosted", "X64"],
["self-hosted", "ARM64"],
["macos-12"],
["windows-2019"],
["macos-latest-xlarge"]
]
}
github_prerelease: false
restrict_custom_actions: false

0 comments on commit 57aaba8

Please sign in to comment.