Skip to content

oxygenxml/oxygen-scripting-validation-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oxygen Validation Action

This action triggers Oxygen Scripting to perform a validation on your repository files. It can be used to validate XML, XSL, XQuery, XSD, JSON, JSON Schema, YAML, HTML, CSS, LESS, WSDL, DITA, RNG, DTD, JS. All you have to do is to include this action in your workflow and choose the directory to be validated. Find more info about workflows on https://docs.github.com/en/actions/using-workflows.

👀 See Oxygen Validate Script for more details about this script.

Requirements

In order to use this action, you need to obtain an Oxygen Scripting license key from https://www.oxygenxml.com/xml_scripting/pricing.html (you can also request a trial). Add it as a secret to your repository (Settings → Secrets → Actions → New repository secret), and name it "SCRIPTING_LICENSE_KEY". Then use it as an environment variable:

env:
  SCRIPTING_LICENSE_KEY: ${{secrets.SCRIPTING_LICENSE_KEY}}

Sample usage

If you don't already have a workflow defined in your repository, you can use one of the samples below.

💡 This workflow requires manual trigger from the 'Actions' tab:

name: Run Validation (manually)
on:
  workflow_dispatch:
    inputs:
      validationDir:
        description: 'The directory to be validated.'
        required: true
jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - name: Oxygen Validation Script
        uses: oxygenxml/oxygen-scripting-validation-action@v1.0.0
        env:
          SCRIPTING_LICENSE_KEY: ${{secrets.SCRIPTING_LICENSE_KEY}}
        with:
          validationDir: ${{ github.event.inputs.validationDir }}

💡 This workflow automatically starts when a commit is pushed to the main branch, but can also be triggered manually:

name: Run Validation (automatically)
# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the "main" branch
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
  workflow_dispatch: # Allows you to run this workflow manually from the Actions tab

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - name: Oxygen Validation Script
        uses: oxygenxml/oxygen-scripting-validation-action@v1.0.0
        env:
          SCRIPTING_LICENSE_KEY: ${{secrets.SCRIPTING_LICENSE_KEY}}
        with:
          validationDir: 'validation' # Here you specify the directory to be validated.

👀 Check Oxygen Scripting - Validation template for a ready-to-use template with sample validation files.

Deployment to GitHub Pages

After a successful run of the Oxygen Validation Script, a "validationReport.html" file is created on the gh-pages branch. If you want this report to be published to GitHub Pages, all you have to do is go to Settings → Pages, and under Build and deployment section select the gh-pages branch instead of the main branch.

The deployment workflow should automatically start and the report should be available shortly at: https://{userid}.github.io/{reponame}/validationReport.html.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

5 stars

Watchers

23 watching

Forks

Packages

 
 
 

Contributors