Skip to content

Delete CNAME

Delete CNAME #527

Workflow file for this run

---
name: Build and test inspec_tools
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
fetch-depth: 0
- name: Fetch all tags for versioning
run: git fetch origin +refs/tags/*:refs/tags/*
- name: Setup Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install bundler and git-lite-version-bump
run: gem install bundler git-lite-version-bump
- name: Run bundle install
run: bundle install
- name: Generate mapping objects
run: bundle exec rake generate_mapping_objects
- name: Run rubocop
run: bundle exec rubocop
- name: Run bundle-audit
run: bundle-audit check --update
- name: Build inspec_tools gem
run: gem build inspec_tools.gemspec
- name: Upload inspec_tools gem
uses: actions/upload-artifact@v2
with:
name: inspec_tools_gem
path: inspec_tools-*.gem
test-gem:
needs: build
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
ruby: [ 2.7 ]
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Ruby ${{matrix.ruby}}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
- uses: actions/checkout@v2
with:
lfs: true
fetch-depth: 0
- name: Download inspec_tools gem
uses: actions/download-artifact@v2
with:
name: inspec_tools_gem
- name: Install inspec_tools gem
run: gem install inspec_tools-*.gem
- name: Run installed inspec_tools
run: |
inspec_tools --version
inspec_tools --help
inspec_tools xlsx2inspec -m examples/xlsx2inspec/mapping.cis.yml -x examples/cis.xlsx -p xlsx2inspec_test -o xlsx2inspec_test
inspec_tools summary -j examples/sample_json/rhel-simp.json
inspec_tools csv2inspec -c examples/csv2inspec/stig.csv -m examples/csv2inspec/mapping.yml -o csv2inspec_test
inspec_tools xccdf2inspec -x examples/xccdf2inspec/xccdf.xml -a lib/data/attributes.yml -o xccdf2inspec_test
inspec_tools xccdf2inspec -x examples/xccdf2inspec/data/U_JBOSS_EAP_6-3_STIG_V1R2_Manual-xccdf.xml -o xccdf2inspec_replace_test -r JBOSS_HOME
inspec_tools pdf2inspec -p examples/CIS_Ubuntu_Linux_16.04_LTS_Benchmark_v1.0.0.pdf -o pdf2inspec_test
inspec_tools inspec2csv -j examples/sample_json/rhel-simp.json -o inspec2csv_test.csv
inspec_tools inspec2ckl -j examples/sample_json/rhel-simp.json -o inspec2ckl_test_1.ckl
inspec_tools inspec2ckl -j test/data/inspec_1.json -o test/data/inspec2ckl_test_2.ckl
inspec_tools inspec2xccdf -j examples/sample_json/rhel-simp.json -a lib/data/attributes.yml -o inspec2xccdf_test.xml
inspec_tools inspec2xccdf -j examples/sample_json/rhel-simp.json -a examples/inspec2xccdf/xccdf_compliant_attribute.json -m examples/inspec2xccdf/metadata.json -o inspec2xccdf_11_1.xml
inspec_tools inspec2xccdf -j examples/sample_json/inspec-v4.28.0.json -a examples/inspec2xccdf/xccdf_compliant_attribute.json -o inspec2xccdf_11_2.xml
inspec_tools compliance -j examples/sample_json/single_control_results.json -f examples/sample_yaml/threshold.yaml
env:
CHEF_LICENSE: "accept"
- name: Validate Output Profiles with inspec check
run: |
gem install inspec-bin
inspec check xlsx2inspec_test
inspec check csv2inspec_test
inspec check xccdf2inspec_test
inspec check xccdf2inspec_replace_test
inspec check pdf2inspec_test
env:
CHEF_LICENSE: "accept"
- name: Validate Output CKL with xmllint
if: matrix.platform == 'ubuntu-latest'
uses: ChristophWurst/xmllint-action@v1
with:
xml-file: inspec2ckl_test_1.ckl
xml-schema-file: test/schemas/U_Checklist_Schema_V2-3.xsd
- name: Validate Output CKL with xmllint
if: matrix.platform == 'ubuntu-latest'
uses: ChristophWurst/xmllint-action@v1
with:
xml-file: test/data/inspec2ckl_test_2.ckl
xml-schema-file: test/schemas/U_Checklist_Schema_V2-3.xsd
- name: Validate XCCDF 1.1 with xmllint (Inspec Version < 4.28)
if: matrix.platform == 'ubuntu-latest'
uses: ChristophWurst/xmllint-action@v1
with:
xml-file: inspec2xccdf_11_1.xml
xml-schema-file: test/schemas/xccdf_114/xccdf-1.1.4.xsd
- name: Validate XCCDF 1.1 with xmllint (Inspec Version > 4.28)
if: matrix.platform == 'ubuntu-latest'
uses: ChristophWurst/xmllint-action@v1
with:
xml-file: inspec2xccdf_11_2.xml
xml-schema-file: test/schemas/xccdf_114/xccdf-1.1.4.xsd
test:
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
ruby: [ 2.7 ]
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Ruby ${{matrix.ruby}}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
- uses: actions/checkout@v2
with:
lfs: true
fetch-depth: 0
- name: Install bundler and git-lite-version-bump
run: gem install bundler git-lite-version-bump
- name: Run bundle install
run: bundle install
- name: Generate mapping objects
run: bundle exec rake generate_mapping_objects
- name: Run rake test
run: bundle exec rake test