Skip to content

fix testing

fix testing #10

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
paths:
- '.github/workflows/test.yml'
- '**/*'
env:
CLI_VERSION: "v2024.10.28"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup latest release of OpsLevel CLI
uses: ./setup-cli/
- name: run opslevel version
run: opslevel version
- name: setup specific version of OpsLevel CLI
uses: ./setup-cli/
with:
cli_version: "${{ env.CLI_VERSION }}"
- name: run opslevel version
run: |
EXPECTED_VERSION="${{ env.CLI_VERSION }}"
ACTUAL_VERSION=$(opslevel version --short | cut -d'-' -f1)
echo "EXPECTED_VERSION: $EXPECTED_VERSION"
echo "ACTUAL_VERSION: $ACTUAL_VERSION"
if [[ $ACTUAL_VERSION != "${EXPECTED_VERSION:1}" ]]; then
exit 1
fi