forked from GSA/fedramp-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update vendor/oscal to v1.0.2 tag. * Add workflow for running the Java and Python example tests. * Remove Overmind devtools. * Example don't require complete initialization - only submodules are required, as all other dependencies are in the appropriate Dockerfiles. * Build Schematron before running example tests. * Run example tests on a matrix of [ubuntu, windows]. Follow-up: add a separate Windows Dockerfile to test Python code on Windows. * Turn off fail-fast, so the complete matrix will run despite failures. * Use bash on all operating systems (pwsh is default on Windows). * Test: remove BASE_DIR usage from validations module.mk, in attempt to make paths work on Windows. * Debugging * Try adding separate container for Windows python tests. * Run Python on Windows directly - rather than via make & docker. * Turn on pytest verbose logging. * Add note about msys2 usage for Windows users who may want to use the Makefile. * For Windows compatibility: pass local path arguments as file URIs. * Update main test runner to run example tests on both Windows and Linux. * Add Schematron build step to test runner. * Don't suppress curl output/status code * Add argument for curl to fail on 404 * Update xspec to use dnaab/support-msys. Temporary, until PR is merged: xspec/xspec#1620 * Local python script: use "python" vs "python3", so default Windows install of Python 3 will work without change. * Explicitly pass down SAXON_CP as environment var - appears to be necessary on MSYS2. * Remove Windows workflow for Python tests, in favor of running just the Linux tests via the Makefile. Running the Python tests on Windows now works, but is difficult to automate via Github actions. * Remove platform attribute * Java example container: linux/amd64 * For Python example, update Saxon/C version to 11.3. This includes code changes due to an updated API interface. * Remove Windows Dockerfile, for now - wait for better testing opportunity. * Run complete test suite on Linux; exclude the sample projects on Windows, since they require Docker. * Remove currently unnecessary Java example platform. * Remove unused Windows Python make target * Explicitly pass SAXON_CP var to compile-sch.sh, for the benefit of Windows. * Windows test: remove SAXON arg passing * Test: remove another explicit SAXON env var passing * Print installed version of node on errors * Update documentation for Windows dependencies * Format Python code with black * Try using strip function for Windows compat problem * Tweak error str * Update package-lock.json * Update to latest node.js LTS (16.14.2) * Update error message * Remove terminate on error message - this fixes a non-problematic path mismatch on Windows. * Update mkdirp package for windows compat * Reorder help target so the default target is `help`. * remove duplicate help target.
- Loading branch information
1 parent
d6778ec
commit 4f2bf38
Showing
19 changed files
with
208 additions
and
2,013 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,11 @@ on: push | |
jobs: | ||
# one job that runs tests | ||
run-tests: | ||
# Run on ubuntu | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
# Checkout repository and its submodules | ||
steps: | ||
|
@@ -20,32 +23,48 @@ jobs: | |
|
||
- name: Read node version from `.nvmrc` file | ||
id: nvmrc | ||
uses: browniebroke/read-nvmrc-action@v1 | ||
shell: bash | ||
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | ||
|
||
- name: Install required node.js version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "${{ steps.nvmrc.outputs.node_version }}" | ||
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | ||
|
||
# Initialize the workspace with submodules and dependencies. | ||
- name: Initialize workspace | ||
shell: bash | ||
run: make init | ||
|
||
- name: Run test suite | ||
# Compile Schematron to XSL. | ||
- name: Compile Schematron | ||
shell: bash | ||
run: make build-validations | ||
|
||
- name: Run complete test suite | ||
shell: bash | ||
if: runner.os == 'Linux' | ||
run: | | ||
make test | ||
- name: Run limited test suite | ||
shell: bash | ||
if: runner.os == 'Windows' | ||
run: | | ||
make test-web test-validations | ||
make test-validations test-web | ||
# Sets the test report path for visibility | ||
- name: Publish XSpec Test Results | ||
uses: mikepenz/action-junit-report@v1 | ||
if: runner.os == 'Linux' | ||
with: | ||
report_paths: "**/report/test/*junit.xml" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Publish the test summary as comment on the PR | ||
- name: Publish XSpec Test Results Summary | ||
uses: EnricoMi/[email protected] | ||
if: always() | ||
if: runner.os == 'Linux' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
check_name: XSpec Test Results | ||
|
@@ -55,6 +74,7 @@ jobs: | |
|
||
- name: Upload Resulting Schematron SVRL Report | ||
uses: actions/upload-artifact@27bce4eee761b5bc643f46a8dfb41b430c8d05f6 # v2 | ||
if: runner.os == 'Linux' | ||
with: | ||
name: fedramp-automation-validation-unit-tests-${{ github.sha }} | ||
path: | | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.4.0 | ||
v16.14.2 |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env python3 | ||
#!/usr/bin/env python | ||
|
||
import argparse | ||
import sys | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
|
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
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
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
Oops, something went wrong.