action-setup/.github/workflows/test.yaml

124 lines
2.5 KiB
YAML
Raw Normal View History

2020-05-08 06:31:14 +00:00
name: Test Action
on:
- push
- pull_request
jobs:
test_default_inputs:
name: Test with default inputs
2020-05-08 10:01:10 +00:00
runs-on: ${{ matrix.os }}
2020-05-08 06:31:14 +00:00
strategy:
fail-fast: false
matrix:
pnpm:
- 4.11.1
2020-05-08 10:01:10 +00:00
os:
- ubuntu-latest
- macos-latest
- windows-latest
2020-05-08 06:31:14 +00:00
steps:
2020-05-08 06:33:13 +00:00
- uses: actions/checkout@v2
2020-05-08 06:31:14 +00:00
- name: Run the action
uses: ./
with:
version: 4.11.1
- name: 'Test: which'
run: which pnpm; which pnpx
- name: 'Test: install'
run: pnpm install
test_explicit_inputs:
name: Test with explicit inputs
runs-on: ${{ matrix.os }}
2020-05-08 06:31:14 +00:00
strategy:
fail-fast: false
matrix:
pnpm:
- 4.11.1
os:
- ubuntu-latest
- macos-latest
- windows-latest
2020-05-08 06:31:14 +00:00
steps:
2020-05-08 06:33:13 +00:00
- uses: actions/checkout@v2
2020-05-08 06:31:14 +00:00
- name: Run the action
uses: ./
with:
version: 4.11.1
2020-05-08 07:27:11 +00:00
dest: ~/test/pnpm
bin_dest: ~/test/pnpm/.bin
2020-05-08 06:31:14 +00:00
registry: http://registry.yarnpkg.com/
- name: 'Test: which'
2020-05-08 07:56:55 +00:00
run: which pnpm && which pnpx
2020-05-08 06:31:14 +00:00
- name: 'Test: install'
run: pnpm install
2020-05-09 14:26:17 +00:00
test_run_install:
2020-05-09 14:35:09 +00:00
name: 'Test with run_install (${{ matrix.run_install.name }}, ${{ matrix.os }})'
2020-05-09 14:26:17 +00:00
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
pnpm:
- 4.11.1
os:
- ubuntu-latest
- macos-latest
- windows-latest
run_install:
- name: 'null'
value: 'null'
- name: 'empty object'
value: '{}'
- name: 'recursive'
value: |
recursive: true
- name: 'global'
value: |
2020-05-09 14:33:18 +00:00
args:
- --global
- --global-dir=./pnpm-global
- npm
- yarn
- pnpm
2020-05-09 14:26:17 +00:00
- name: 'array'
value: |
- {}
- recursive: true
2020-05-09 14:33:18 +00:00
- args:
- --global
- --global-dir=./pnpm-global
- npm
- yarn
- pnpm
2020-05-09 14:26:17 +00:00
steps:
- uses: actions/checkout@v2
- name: Run the action
uses: ./
with:
version: 4.11.1
run_install: ${{ matrix.run_install.value }}
- name: 'Test: which'
run: which pnpm; which pnpx
- name: 'Test: install'
run: pnpm install