Skip to content

Commit

Permalink
ci: add ci for spec-parser (#10805)
Browse files Browse the repository at this point in the history
* ci: add ci for spec-parser

* test: update test

* test: update test

* test: update dependency
  • Loading branch information
KennethBWSong committed Feb 5, 2024
1 parent 028ff45 commit 6d10113
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/spec-parser-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Spec-Parser CI

on:
push:
paths:
- "packages/spec-parser/**"
branches: ["main", "dev", "prerelease", "spec-parser"]
pull_request:
paths:
- "packages/spec-parser/**"
branches: ["main", "dev", "prerelease", "spec-parser"]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}

- name: Install
working-directory: packages/spec-parser/
run: |
npm install
- name: Test
working-directory: packages/spec-parser/
run: |
npm run test:unit
5 changes: 4 additions & 1 deletion packages/spec-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"dependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
"@microsoft/teams-manifest": "^0.1.3",
"@types/webpack": "^5.28.5",
"c8": "^9.1.0",
"dotenv": "^16.4.1",
"fs-extra": "^11.2.0",
"http": "^0.0.1-security",
"https-browserify": "^1.0.0",
Expand All @@ -42,7 +44,8 @@
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"swagger2openapi": "^7.0.8",
"url": "^0.11.3"
"url": "^0.11.3",
"webpack": "^5.90.0"
},
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { OpenAPIV3 } from "openapi-types";
import { Utils } from "../../src/utils";
import * as SwaggerParser from "@apidevtools/swagger-parser";

// TODO: After SpecParser lib become a npm package, these tests should be running in browser environment
describe("SpecParser in Browser", () => {
afterEach(() => {
sinon.restore();
Expand Down

0 comments on commit 6d10113

Please sign in to comment.