You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,18 @@
3
3
When contributing to this repository, please first discuss the change you wish to make via issue,
4
4
email, or any other method with the owners of this repository before making a change.
5
5
6
-
## Pull Request Best Practices
6
+
## Before Making a Pull Request
7
7
8
8
1. Ensure that you've tested your feature/change yourself. As the primary focus of this project is deployment, providing a link to a deployed repository using your branch is preferred. You can reference the forked action using your GitHub username, for example `yourname/github-pages-deplpy-action@master`.
9
9
2. Make sure you update the README if you've made a change that requires documentation.
10
10
3. When making a pull request, highlight any areas that may cause a breaking change so the maintainer can update the version number accordingly on the GitHub marketplace.
11
11
4. Make sure you've formatted and linted your code. You can do this by running `yarn format` and `yarn lint`.
12
-
5. Fix or add any tests where applicable. You can run `yarn test` to run the suite.
12
+
5. Fix or add any tests where applicable. You can run `yarn test` to run the suite. As this action is small in scope it's important that a high level of test coverage is maintained. All tests are written using Jest.
13
+
6. Ensure all typing is accurate and the action compiles correctly by running `yarn build`.
13
14
14
15
# Deploying
15
16
16
-
In order to deploy and test your own fork of this action, you must commit the required `node_modules` dependencies. Be sure to run `nvm use` before installing any dependencies. You can learn more about nvm [here](https://github.com/nvm-sh/nvm/blob/master/README.md).
17
+
In order to deploy and test your own fork of this action, you must commit the `node_modules` dependencies. Be sure to run `nvm use` before installing any dependencies. You can learn more about nvm [here](https://github.com/nvm-sh/nvm/blob/master/README.md).
The `node_modules` folder should _not_ be included when making a pull request. These are only required for GitHub Actions when it consumes the distribution branch branch, the `dev` branch of the project should be free from any dependencies or lib files.
46
+
The `node_modules` folder should _not_ be included when making a pull request. These are only required for GitHub Actions when it consumes the distribution branch, the `dev` branch of the project should be free from any dependencies or lib files.
it('should stop early if there is nothing to commit',async()=>{
@@ -407,7 +417,8 @@ describe('git', () => {
407
417
})
408
418
409
419
awaitdeploy(action)
410
-
expect(execute).toBeCalledTimes(14)
420
+
expect(execute).toBeCalledTimes(12)
421
+
expect(rmRF).toBeCalledTimes(1)
411
422
})
412
423
413
424
it('should throw an error if one of the required parameters is not available',async()=>{
@@ -427,7 +438,8 @@ describe('git', () => {
427
438
try{
428
439
awaitdeploy(action)
429
440
}catch(e){
430
-
expect(execute).toBeCalledTimes(2)
441
+
expect(execute).toBeCalledTimes(0)
442
+
expect(rmRF).toBeCalledTimes(1)
431
443
expect(e.message).toMatch(
432
444
'The deploy step encountered an error: No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true. ❌'
0 commit comments