Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ci #1

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/fmt-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check the Program
run-name: Check the formatting and code
on: [push]
jobs:
check:
runs-on: ubuntu-24.04
container:
image: node:20
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: Install the App
run: yarn install
shell: bash
- name: Check the formatting
run: yarn run prettier --check .
shell: bash
- name: Lint the App
run: yarn lint
shell: bash
- name: Build the App
run: yarn build
shell: bash
- name: Test the App
run: yarn test
shell: bash
27 changes: 13 additions & 14 deletions .github/workflows/lint-spec.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: Vacuum open API linting
name: Vacuum open API linting
run-name: Linting OpenAPI spec with Vacuum
on: [push]
jobs:
vacuum-lint:
runs-on: ubuntu-24.04
container: dshanley/vacuum:v0.13.1
steps:
- uses: actions/checkout@v4
- name: Generate Vacuum HTML Reports
run: mkdir -p reports; for FILEPATH in specs/ccapi*.json; do FILE="$(echo $FILEPATH | cut -d '/' -f2 | cut -d '.' -f1)"; vacuum html-report "${FILEPATH}" "reports/report-${FILE}.html"; done
shell: bash
- name: Archive Vacuum HTML Reports
uses: actions/upload-artifact@v3
with:
name: Vacuum HTML Reports
path: reports/*.html
- name: Lint with Vaccum
run: vacuum lint specs/ccapi* || true
shell: bash

- uses: actions/checkout@v4
- name: Generate Vacuum HTML Reports
run: mkdir -p reports; for FILEPATH in specs/ccapi*.json; do FILE="$(echo $FILEPATH | cut -d '/' -f2 | cut -d '.' -f1)"; vacuum html-report "${FILEPATH}" "reports/report-${FILE}.html"; done
shell: bash
- name: Archive Vacuum HTML Reports
uses: actions/upload-artifact@v3
with:
name: Vacuum HTML Reports
path: reports/*.html
- name: Lint with Vaccum
run: vacuum lint specs/ccapi* || true
shell: bash
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
specs/ccapi_*.json
.yarn/
11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,18 @@ As you look to contribute here, please bear in mind our values, the 5 S's, and h

- Stateless: Be adaptable. Be open minded, and willing to try new things. Be willing to iterate, and comfortable with getting started when things are still ambiguous. Be informed and passionate, but flexible - strong opinions, weakly held.


## Reporting an Issue

There are a few types of issues you can file here:

- bug: Something doesn't work the way it should? That's probably a bug. Please include a careful, step-by-step guide to reproducing the bug, if possible. If reproducing the bug is hard to do without access to your environment, leave a note to that effect and we'll try to reach out for a private and secure conversation. If you have a security-sensitive ticket that you don't want to file publicly, please email ***insert security email address here*** instead of opening a ticket.
- bug: Something doesn't work the way it should? That's probably a bug. Please include a careful, step-by-step guide to reproducing the bug, if possible. If reproducing the bug is hard to do without access to your environment, leave a note to that effect and we'll try to reach out for a private and secure conversation. If you have a security-sensitive ticket that you don't want to file publicly, please email **_insert security email address here_** instead of opening a ticket.

- enhancement: Also known as Feature Requests, Enhancement tickets are for when you have something in mind that the Console Connect API Sandbox does not do but that you would like it to. Before filling out a feature request, we recommend you check our roadmap for features already planned.  If you don’t see it on there, go ahead and fill in a request.  Depending on your project and timelines, this may also be a great opportunity to try your hand at contributing to this project.

- question: we generally recommend that you use the Questions channel for general questions.  However, if you’re working on contributing code and have a question related to a ticket you picked up or a feature you’re developing, you can open a question ticket here for guidance and support.

- feedback: Not quite a feature request or a bug, but not really a question either? Feel free to leave general feedback here. We don't guarantee we'll act on all feedback, but we'll certainly read it.


## Writing Code

If you've got a pet peeve you want fixed, or a great idea for something to improve, here's your best bet for fixing it! We recommend you file a ticket according to reporting an issue above so there's a record of exactly what you're looking to fix, but once that's done we follow a fairly standard fork -> merge request model for community contributions.
Expand All @@ -70,12 +68,11 @@ Once you're ready to start, here are the steps to follow:

1. Fork the repo into your own namespace.

2. Make a branch for your work. We recommend using the Github "Open Pull Request" button 
2. Make a branch for your work. We recommend using the Github "Open Pull Request" button

3. Fill out the pull request template according to the steps in it - we're not ultra strict here, but it helps make our review process smoother.

4. Once you're ready for review, remove the 

4. Once you're ready for review, remove the

### What to expect from our code reviews

Expand All @@ -87,7 +84,7 @@ Testing deserves a special callout. In general, we don't want merge requests to

## What if I just have a question?

Great! We'll do our best to answer, you can reach us by ***input link or email address or other method for open source community to use for asking questions***.
Great! We'll do our best to answer, you can reach us by **_input link or email address or other method for open source community to use for asking questions_**.

## Thanks!

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

cc-api-sandbox is a mock server for the Console Connect API.

*Please, be aware that this repo is under heavy development, and should be expected to change rapidly.*
_Please, be aware that this repo is under heavy development, and should be expected to change rapidly._

## Installation

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default tseslint.config(
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
}
},
},
// And specific rules for test code
{
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"start": "node ./dist/src/index.js",
"dev": "ts-node ./src/index.ts",
"watch": "nodemon src/index.ts",
"lint": "eslint --max-warnings=0 ./src",
"lint": "eslint --max-warnings=0 ./src ./eslint.config.mjs ./jest.config.ts",
"clean": "tsc --build --clean",
"fmt": "prettier --write src/.",
"fmt": "prettier --write .",
"postinstall": "husky",
"test": "jest"
},
Expand Down
Loading