Skip to content

ci: use x64 arch node 10, 12, 14 for macos-latest #12

ci: use x64 arch node 10, 12, 14 for macos-latest

ci: use x64 arch node 10, 12, 14 for macos-latest #12

Workflow file for this run

name: asdf-pnpm CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
plugin-test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
# Compatibility matrix from https://pnpm.io/installation#compatibility
version:
- 4
- 5
- 6
- 7
- 8
- 9
node:
- 10
- 12
- 14
- 16
- 18
- 20
exclude:
# pnpm >= v9 does not support node <= v16
- node: 10
version: 9
- node: 12
version: 9
- node: 14
version: 9
- node: 16
version: 9
# pnpm >= v8 does not support node <= v14
- node: 10
version: 8
- node: 12
version: 8
- node: 14
version: 8
# pnpm >= v7 does not support node <= v12
- node: 10
version: 7
- node: 12
version: 7
# pnpm >= v6 does not support node <= v10
- node: 10
version: 6
name: plugin-test (pnpm v${{ matrix.version }}, Node.js v${{ matrix.node }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/github-script@v7
id: calculate_architecture
with:
result-encoding: string
script: |
if ('${{ matrix.os }}' === 'macos-latest' && ['10', '12', '14'].includes('${{ matrix.node }}')) {
return "x64"
} else {
return ''
}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ steps.calculate_architecture.outputs.result }}
- name: Test pnpm
uses: asdf-vm/actions/plugin-test@v3
with:
command: pnpm --version
version: latest:${{ matrix.version }}
- name: Test pnpx
if: matrix.version < 7
uses: asdf-vm/actions/plugin-test@v3
with:
command: pnpx --version
version: latest:${{ matrix.version }}
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run ShellCheck
run: shellcheck bin/*
shfmt:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: reviewdog/action-shfmt@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
shfmt_flags: -d -i 2 -ci