fix testing #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |