Skip to content

Bump eslint from 9.33.0 to 10.5.0 #177

Bump eslint from 9.33.0 to 10.5.0

Bump eslint from 9.33.0 to 10.5.0 #177

Workflow file for this run

on: push
name: Test installation
jobs:
use-latest-version:
name: "Test getting latest CLI stable version"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install 1Password CLI
uses: ./ # 1password/install-cli-action@<version>
- name: Check CLI version
run: ./test/assert-version.sh latest
use-latest-beta-version:
name: "Test getting latest CLI beta version"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install 1Password CLI
uses: ./ # 1password/install-cli-action@<version>
with:
version: latest-beta
- name: Check CLI version
run: ./test/assert-version.sh latest-beta
use-specific-version:
name: "Test getting a specific CLI version"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install 1Password CLI
uses: ./ # 1password/install-cli-action@<version>
with:
version: 2.18.0
- name: Check CLI version
run: ./test/assert-version.sh 2.18.0
use-specific-beta-version:
name: "Test getting a specific CLI beta version"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install 1Password CLI
uses: ./ # 1password/install-cli-action@<version>
with:
version: 2.19.0-beta.01
- name: Check CLI version
run: ./test/assert-version.sh 2.19.0-beta.01
use-docker-hub-fallback:
name: "Test Docker Hub fallback when app-updates is unavailable"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- channel: latest
versionPath: .CLI2.release.version
- channel: latest-beta
versionPath: .CLI2.beta.version
steps:
- uses: actions/checkout@v6
- name: Capture expected ${{ matrix.channel }} version from app-updates
id: expected
run: |
version=$(curl -s https://app-updates.agilebits.com/latest | jq -r '${{ matrix.versionPath }}')
echo "Expected ${{ matrix.channel }} version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
# Blackhole only app-updates.agilebits.com. The download CDN (cache.agilebits.com)
# and Docker Hub stay reachable, so the primary source fails but the fallback works.
- name: Simulate an app-updates.agilebits.com outage
run: echo "127.0.0.1 app-updates.agilebits.com" | sudo tee -a /etc/hosts
- name: Install 1Password CLI (must resolve via the Docker Hub fallback)
uses: ./ # 1password/install-cli-action@<version>
with:
version: ${{ matrix.channel }}
- name: Assert the fallback resolved the same version app-updates would have
run: ./test/assert-version.sh "${{ steps.expected.outputs.version }}"
- name: Restore app-updates resolution
if: always()
run: sudo sed -i '/app-updates.agilebits.com/d' /etc/hosts
use-baked-in-fallback:
name: "Test baked-in fallback when app-updates and Docker Hub are unavailable"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- channel: latest
key: latest
- channel: latest-beta
key: latestBeta
steps:
- uses: actions/checkout@v6
- name: Read expected baked-in ${{ matrix.channel }} version
id: expected
run: |
version=$(grep "ReleaseChannel.${{ matrix.key }}]" src/op-cli-installer/version/fallback-versions.ts | grep -oE '"[^"]+"' | tr -d '"')
echo "Expected baked-in ${{ matrix.channel }} version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
# Blackhole both live sources so resolution must fall through to the pinned version
- name: Simulate an app-updates and Docker Hub outage
run: |
echo "127.0.0.1 app-updates.agilebits.com" | sudo tee -a /etc/hosts
echo "127.0.0.1 hub.docker.com" | sudo tee -a /etc/hosts
- name: Install 1Password CLI (must resolve via the baked-in fallback)
uses: ./ # 1password/install-cli-action@<version>
with:
version: ${{ matrix.channel }}
- name: Assert the baked-in version was installed
run: ./test/assert-version.sh "${{ steps.expected.outputs.version }}"
- name: Restore resolution
if: always()
run: sudo sed -i '/app-updates.agilebits.com/d;/hub.docker.com/d' /etc/hosts