diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml new file mode 100644 index 0000000..d6955a7 --- /dev/null +++ b/.github/workflows/smoke.yml @@ -0,0 +1,43 @@ +name: Smoke Tests + +on: + push: + branches: + - "**" + pull_request: + branches: + - "**" + +jobs: + smoke-tests: + name: Smoke Tests + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: 'npm' + + - name: Install Node.js dependencies + run: | + npm install + + - name: Test Generator Options Command + run: | + ./src/index.js generator-options openapi-forge-javascript + id: test_forge + + - name: Check Output of Generator Options + run: | + echo "Checking the output for moduleFormat" + if grep -q "moduleFormat" <(echo "${{ steps.test_forge.outputs.stdout }}"); then + echo "Output includes moduleFormat" + else + echo "ERROR: Output does not include moduleFormat" + exit 1 + fi