Skip to content

Commit

Permalink
Merge pull request #5 from mitre/dev
Browse files Browse the repository at this point in the history
Multiple Enhancements
  • Loading branch information
em-c-rod authored Nov 9, 2022
2 parents e5cef5b + 15e6a2c commit 0d86a48
Show file tree
Hide file tree
Showing 170 changed files with 871,184 additions and 2,829 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run TS-InSpec-Objects E2E Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: Install dependencies
run: npm install

- name: Run e2e tests
run: yarn test
33 changes: 33 additions & 0 deletions .github/workflows/push-to-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Push @mitre/inspec-objects to NPM
on:
release:
types: [published]

jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master

- name: setup node
uses: actions/setup-node@v1
with:
node-version: "16.x"
registry-url: 'https://registry.npmjs.org'

- name: Install project dependencies
run: npm ci

- name: Remove testing resources
run: rm -rf test

- name: Build
run: npm run build

- name: Pack all items that are published as packages
run: npm pack

- name: Publish SAF CLI to NPM
run: npm publish --access public mitre-inspec-objects-*.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,16 @@ dist

# TernJS port file
.tern-port

# Built files
lib

# .DS_Store files
*.DS_Store

# No need to push these generated objects that are used for testing
test/sample_data/profile-objects/STIG/*
test/sample_data/profile-objects/CIS/*
test/sample_data/diffs/*
test/sample_data/updates/*
test/sample_data/markdown/*
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test
src
4 changes: 0 additions & 4 deletions index.ts

This file was deleted.

Loading

0 comments on commit 0d86a48

Please sign in to comment.