Skip to content

Commit

Permalink
keep lint step
Browse files Browse the repository at this point in the history
  • Loading branch information
wandmagic committed Nov 26, 2024
1 parent 0bb7f93 commit 6163b66
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/run-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This action runs unit tests for the OSCAL (schematron) validations to ensure validations
# are working against known samples
name: "OSCAL Validations: Style test"

# Triggered when code is pushed to master and on pull requests
on:
push:
branches:
- master
- develop
- 'feature/**' # This will match any branch starting with "feature"

pull_request:

# the job requires some dependencies to be installed (including submodules), runs the tests, and then reports results
jobs:
# one job that runs tests
run-tests:
runs-on: ubuntu-20.04
# Checkout repository and its submodules
steps:
# Check-out the repository under $GITHUB_WORKSPACE
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Set up Java
uses: actions/setup-java@67fbd726daaf08212a7b021c1c4d117f94a81dd3
with:
distribution: 'adopt'
java-version: '11'
- name: Read node version from `.nvmrc` file
id: nvmrc
shell: bash
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV

- name: Install required node.js version
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install OSCAL CLI
run: |
make configure
- name: Run Lint tests
shell: bash
run: |
make lint
- name : Publish all Junit XML tests results in Github Summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86
if: always()
with:
paths: |
**/reports/junit-*.xml
2 changes: 1 addition & 1 deletion features/steps/fedramp_extensions_steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ Then('I should verify that all constraints follow the style guide constraint', a
for (const file_name of constraint_files) {
const filePath = join(constraintDir, file_name.trim());
try {
const {isValid,log} = await validateDocument(filePath,{flags:['disable-schema'],quiet,extensions:[styleGuidePath],module:"http://csrc.nist.gov/ns/oscal/metaschema/1.0"},'oscal-cli')
const {isValid,log} = await validateDocument(filePath,{flags:['disable-schema'],quiet,extensions:[styleGuidePath],module:"http://csrc.nist.gov/ns/oscal/metaschema/1.0"},executor)
writeFileSync(
join(
__dirname,
Expand Down

0 comments on commit 6163b66

Please sign in to comment.