Skip to content

Commit bc7bac4

Browse files
Merge pull request #16 from 1Password/vzt/windows-support
Add Windows runner support
2 parents 36d945b + 3eed3f1 commit bc7bac4

33 files changed

+42140
-81
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@ on: push
22
name: Test installation
33

44
jobs:
5+
jest-tests:
6+
name: "Run Jest tests"
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Install dependencies
11+
run: npm install
12+
- name: Run Jest tests
13+
run: npm test
514
use-latest-version:
615
name: "Test getting latest CLI stable version"
716
strategy:
817
matrix:
9-
os: [ubuntu-latest, macos-latest]
18+
os: [ubuntu-latest, macos-latest, windows-latest]
1019
runs-on: ${{ matrix.os }}
1120
steps:
12-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
1322
- name: Install 1Password CLI
1423
uses: ./ # 1password/install-cli-action@<version>
1524
- name: Check CLI version
@@ -18,10 +27,10 @@ jobs:
1827
name: "Test getting latest CLI beta version"
1928
strategy:
2029
matrix:
21-
os: [ubuntu-latest, macos-latest]
30+
os: [ubuntu-latest, macos-latest, windows-latest]
2231
runs-on: ${{ matrix.os }}
2332
steps:
24-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
2534
- name: Install 1Password CLI
2635
uses: ./ # 1password/install-cli-action@<version>
2736
with:
@@ -32,10 +41,10 @@ jobs:
3241
name: "Test getting a specific CLI version"
3342
strategy:
3443
matrix:
35-
os: [ubuntu-latest, macos-latest]
44+
os: [ubuntu-latest, macos-latest, windows-latest]
3645
runs-on: ${{ matrix.os }}
3746
steps:
38-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
3948
- name: Install 1Password CLI
4049
uses: ./ # 1password/install-cli-action@<version>
4150
with:
@@ -46,10 +55,10 @@ jobs:
4655
name: "Test getting a specific CLI beta version"
4756
strategy:
4857
matrix:
49-
os: [ubuntu-latest, macos-latest]
58+
os: [ubuntu-latest, macos-latest, windows-latest]
5059
runs-on: ${{ matrix.os }}
5160
steps:
52-
- uses: actions/checkout@v3
61+
- uses: actions/checkout@v4
5362
- name: Install 1Password CLI
5463
uses: ./ # 1password/install-cli-action@<version>
5564
with:

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged --config ./lint-staged.config.js

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run validate

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage/
2+
dist/
3+
node_modules/

action.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,5 @@ inputs:
99
description: Specify which 1Password CLI version to install. Defaults to "latest".
1010
default: "latest"
1111
runs:
12-
using: composite
13-
steps:
14-
- shell: bash
15-
env:
16-
OP_CLI_VERSION: ${{ inputs.version }}
17-
run: |
18-
${{ github.action_path }}/install-cli.sh
12+
using: "node20"
13+
main: "dist/index.js"

0 commit comments

Comments
 (0)