mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 22:23:07 +00:00
bcb42c8a21
Update actions/upload-artifact Change-type: patch
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
---
|
|
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@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
|
with:
|
|
node-version: ${{ inputs.NODE_VERSION }}
|
|
cache: npm
|
|
|
|
- name: Set up Python 3.11
|
|
if: runner.os == 'macOS'
|
|
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- 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:core
|
|
|
|
- name: Compress custom source
|
|
shell: pwsh
|
|
run: tar --exclude-vcs -acf ${{ runner.temp }}/custom.tgz .
|
|
|
|
- name: Upload custom artifact
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
|
|
with:
|
|
name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
|
|
path: ${{ runner.temp }}/custom.tgz
|
|
retention-days: 1
|