Skip to content

Commit

Permalink
tests: Add a replay client (#26)
Browse files Browse the repository at this point in the history
- **export at the end of file**
- **move github to subfolder**
- **tests: Add a replay client**
- **Migrate to ESM**
- **Migrate from ncc to rollup**
  • Loading branch information
corentinmusard authored Dec 30, 2024
1 parent 607e6cc commit 5740bbe
Show file tree
Hide file tree
Showing 38 changed files with 109,295 additions and 127,341 deletions.
1 change: 1 addition & 0 deletions .env.test.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GH_TOKEN=
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
},
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"[dotenv]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- tests: Add a replay client
- Migrate to ESM
- Migrate from ncc to rollup
- Migrate from eslint/prettier to biome

## [1.11.0] - 2024-12-19

### Added
Expand Down
17 changes: 14 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,26 @@ git clone [email protected]:corentinmusard/otel-cicd-action.git
cd otel-cicd-action
```

Setup precommit hook, install dependencies and run tests:
Setup precommit hook, install dependencies:

```sh
npm run prepare
npm i
npm run test
```

## Contributing code
Fill `.env.test` based on `.env.test.example`.

`GH_TOKEN` can be found by running `gh auth token`

## Testing

We use a record/replay octokit client to make testing easier.

`npm run test:record` will record all the request made with a real octokit client.

`npm run test` will replay the recorded requests.

## Pushing code

Be sure to run the following command before pushing code.

Expand Down
8 changes: 7 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"linter": {
"rules": {
"complexity": {
"useLiteralKeys": "off"
"useLiteralKeys": "off",
"noExcessiveCognitiveComplexity": "info"
},
"performance": {
"noAccumulatingSpread": "off"
Expand All @@ -20,5 +21,10 @@
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"json": {
"parser": {
"allowComments": true
}
}
}
Loading

0 comments on commit 5740bbe

Please sign in to comment.