Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6c117ed
Initialize npm and install dependencies
volodymyrZotov Jul 18, 2025
33e1725
Add tsconfig.json
volodymyrZotov Jul 18, 2025
6bc0739
Add configs for husky, prettier, jest and lint-staged
volodymyrZotov Jul 18, 2025
2a32513
Add cli-installer package that contains all the logic to install CLI …
volodymyrZotov Jul 19, 2025
7f032ae
Add entrypoint file
volodymyrZotov Jul 19, 2025
7e161d9
Build js version of the action
volodymyrZotov Jul 19, 2025
ad39320
Update action entry point
volodymyrZotov Jul 19, 2025
b9fb00f
Update tests to run on windows only
volodymyrZotov Jul 19, 2025
c106dbe
Add debug logs
volodymyrZotov Jul 19, 2025
79fd3de
Refactor login to get latest version
volodymyrZotov Jul 19, 2025
896a1ec
Throw error only when invalid version param is passed
volodymyrZotov Jul 19, 2025
58af2c4
Fix ts-jest warning
volodymyrZotov Jul 21, 2025
ee85d21
Move all config file to root
volodymyrZotov Jul 21, 2025
3f26e2a
Add package.json to dist
volodymyrZotov Jul 21, 2025
0c510c6
Introduce `version` package that incapsulates all the logic for getti…
volodymyrZotov Jul 21, 2025
163fa43
Temporary update test to point to the feature branch
volodymyrZotov Jul 21, 2025
bee00c9
Override `install` method for macos runner and add more logs
volodymyrZotov Jul 21, 2025
66656a8
Add jest tests job
volodymyrZotov Jul 21, 2025
7d4c11c
Add TODO about updating `getLatestVersion` implementation
volodymyrZotov Jul 22, 2025
1a68528
Revert tests to point to the current dir
volodymyrZotov Jul 22, 2025
722f7dc
Remove install CLI script
volodymyrZotov Jul 22, 2025
cd78745
Simplify `getLatestVersion` function
volodymyrZotov Jul 22, 2025
478be7b
Fix formatting and lint errors
volodymyrZotov Jul 22, 2025
22ca98f
Do not need to install CLI to run unit tests
volodymyrZotov Jul 23, 2025
f884838
Add test case for validating v2.19.3-beta.12
volodymyrZotov Jul 23, 2025
f9f495b
Support both self hosted and github hosted runner architectures
volodymyrZotov Jul 23, 2025
79dce53
Update lint staged so it pass with changed files has no tests
volodymyrZotov Jul 23, 2025
c92e38e
Refactor to incapsulate download urls in a map
volodymyrZotov Jul 24, 2025
99f936a
Update actions/checkout to v4
volodymyrZotov Jul 24, 2025
e06540d
Write tests for installers and remove --passWithNoTests option from l…
volodymyrZotov Jul 24, 2025
3eed3f1
Make latest build, fix windows download url and fix tests
volodymyrZotov Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@ on: push
name: Test installation

jobs:
jest-tests:
name: "Run Jest tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Run Jest tests
run: npm test
use-latest-version:
name: "Test getting latest CLI stable version"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install 1Password CLI
uses: ./ # 1password/install-cli-action@<version>
- name: Check CLI version
Expand All @@ -18,10 +27,10 @@ jobs:
name: "Test getting latest CLI beta version"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install 1Password CLI
uses: ./ # 1password/install-cli-action@<version>
with:
Expand All @@ -32,10 +41,10 @@ jobs:
name: "Test getting a specific CLI version"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install 1Password CLI
uses: ./ # 1password/install-cli-action@<version>
with:
Expand All @@ -46,10 +55,10 @@ jobs:
name: "Test getting a specific CLI beta version"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install 1Password CLI
uses: ./ # 1password/install-cli-action@<version>
with:
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged --config ./lint-staged.config.js
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run validate
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage/
dist/
node_modules/
9 changes: 2 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,5 @@ inputs:
description: Specify which 1Password CLI version to install. Defaults to "latest".
default: "latest"
runs:
using: composite
steps:
- shell: bash
env:
OP_CLI_VERSION: ${{ inputs.version }}
run: |
${{ github.action_path }}/install-cli.sh
using: "node20"
main: "dist/index.js"
Loading
Loading