Skip to content

Commit 6c62f08

Browse files
committed
tests
1 parent 9db9d99 commit 6c62f08

2 files changed

Lines changed: 402 additions & 0 deletions

File tree

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Shell argv contract
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
unix-shells:
14+
name: Bash / Zsh / Fish on ${{ matrix.os }}
15+
runs-on: ${{ matrix.os }}
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os:
21+
- ubuntu-latest
22+
- macos-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Install pnpm
29+
uses: pnpm/action-setup@v4.0.0
30+
31+
- name: Set node version
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: 20
35+
cache: pnpm
36+
37+
- name: Install shell deps on Linux
38+
if: runner.os == 'Linux'
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y zsh fish
42+
43+
- name: Install shell deps on macOS
44+
if: runner.os == 'macOS'
45+
run: |
46+
brew install fish
47+
48+
- name: Verify Unix shells are available
49+
run: |
50+
bash --version
51+
zsh --version
52+
fish --version
53+
54+
- name: Install deps
55+
run: pnpm install
56+
57+
- name: Run shell argv contract tests
58+
run: pnpm test tests/shell-argv-contract.test.ts
59+
60+
powershell:
61+
name: PowerShell on Windows
62+
runs-on: windows-latest
63+
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v4
67+
68+
- name: Install pnpm
69+
uses: pnpm/action-setup@v4.0.0
70+
71+
- name: Set node version
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: 20
75+
cache: pnpm
76+
77+
- name: Verify PowerShell is available
78+
shell: pwsh
79+
run: |
80+
$PSVersionTable.PSVersion
81+
Get-Command pwsh
82+
83+
- name: Install deps
84+
run: pnpm install
85+
86+
- name: Run shell argv contract tests
87+
run: pnpm test tests/shell-argv-contract.test.ts

0 commit comments

Comments
 (0)