diff --git a/.github/workflows/run-lint.yml b/.github/workflows/run-lint.yml index 3e033e24b..f02805ccc 100644 --- a/.github/workflows/run-lint.yml +++ b/.github/workflows/run-lint.yml @@ -17,7 +17,11 @@ jobs: # one job that runs tests run-tests: runs-on: ubuntu-20.04 - # Checkout repository and its submodules + strategy: + matrix: + version: ['latest', 'snapshot'] + name: Run tests (${{ matrix.version }}) + # Checkout repository and its submodules steps: # Check-out the repository under $GITHUB_WORKSPACE - name: Checkout repository @@ -38,6 +42,8 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - name: Install OSCAL CLI + env: + USE_SNAPSHOT: ${{ matrix.version == 'snapshot' && '1' || '' }} run: | make configure - name: Run Lint tests diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f30d0c9df..7c45c7e09 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -21,7 +21,9 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04, windows-2022] + version: ['latest', 'snapshot'] runs-on: ${{ matrix.os }} + name: Test (${{ matrix.os }}, ${{ matrix.version }}) # Checkout repository and its submodules steps: # Check-out the repository under $GITHUB_WORKSPACE @@ -43,6 +45,8 @@ jobs: with: node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} - name: Install OSCAL CLI + env: + USE_SNAPSHOT: ${{ matrix.version == 'snapshot' && '1' || '' }} run: | make init-validations - name: Run Cucumber tests diff --git a/.tool-versions b/.tool-versions index 045bcbddb..d495a14b3 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,4 @@ oscal-cli 2.4.0 -oscal-server v1.0.0-SNAPSHOT-6773e8b-20250108155951 +oscal-cli-snapshot 2.5.0-SNAPSHOT +oscal-server v1.0.0-SNAPSHOT-6363f60-20241202160440 +oscal-server-snapshot v1.0.0-SNAPSHOT-6773e8b-20250108155951 diff --git a/src/validations/module.mk b/src/validations/module.mk index 679c12500..2970f7623 100644 --- a/src/validations/module.mk +++ b/src/validations/module.mk @@ -1,7 +1,12 @@ # Variables OSCAL_VERSION = $(shell jq -r .dependencies.oscal package.json) -OSCAL_CLI_VERSION = $(shell awk '/^oscal-cli/ {print $$2}' .tool-versions) -OSCAL_SERVER_VERSION = $(shell awk '/^oscal-server/ {print $$2}' .tool-versions) +ifdef USE_SNAPSHOT +OSCAL_CLI_VERSION = $(shell awk '/^oscal-cli-snapshot/ {print $$2}' .tool-versions) +OSCAL_SERVER_VERSION = $(shell awk '/^oscal-server-snapshot/ {print $$2}' .tool-versions) +else +OSCAL_CLI_VERSION = $(shell awk '/^oscal-cli / {print $$2}' .tool-versions) +OSCAL_SERVER_VERSION = $(shell awk '/^oscal-server / {print $$2}' .tool-versions) +endif OSCAL_CLI = npx oscal@$(OSCAL_VERSION) SRC_DIR = ./src DIST_DIR = ./dist