-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial commit - repository bootstrap
- Loading branch information
0 parents
commit e5ec273
Showing
5 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2022 Carlos Pereira <@carlosdevpereira> (https://github.com/carlosdevpereira) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Test & Publish to Cloudflare |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Test & Publish to Cloudflare | ||
author: carlosdevpereira | ||
description: This action runs the test command of a repository, generates the test coverage report, uploads the report to cloudflare pages and comments the results on available pull requests. | ||
|
||
runs: | ||
using: "node16" | ||
main: "index.js" | ||
|
||
inputs: | ||
testCommand: | ||
description: "The command used to run the unit tests of the repository (needs to be the explicit command and not an alias like `npm run test`)." | ||
required: false | ||
default: "./node_modules/jest/bin/jest.js --no-cache --detectOpenHandles --coverage" | ||
cloudflareProjectName: | ||
description: "The name of the project on Cloudflare that will receive the coverage report." | ||
required: true | ||
cloudflareApiToken: | ||
description: "The API Token that will be used to upload the coverage report to Cloudflare." | ||
required: true | ||
cloudflareAccountId: | ||
description: "The Account ID that will be used to upload the coverage report to Cloudflare." | ||
required: true | ||
githubToken: | ||
description: "The github token that will be used to comment the results on available pull requests." | ||
required: true | ||
baseCloudflareDeploymentUrl: | ||
description: "The base URL configured on the target Cloudflare project from which the deployments will be served - It can also be a custom domain configured on the target project. (defaults to https://${cloudflareProjectName}.pages.dev)" | ||
required: false | ||
|
||
outputs: | ||
coverage: | ||
description: "The final coverage percentage - average between the coverage values for Statements/Branches/Functions and Lines." | ||
reportUrl: | ||
description: "The final URL to the coverage report served by Cloudflare." | ||
affectedPullRequestUrls: | ||
description: "Pull request URL's that this action wrote comments on." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* @TODO: Convert existing workflow from personal repository | ||
* into this marketplace publishable action | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "test-publish-to-cloudflare", | ||
"version": "1.0.0", | ||
"description": "Github action that runs the test command of a repository, generates the test coverage report, uploads the report to cloudflare pages and comments the results on available pull requests.", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/carlosdevpereira/test-publish-to-cloudflare.git" | ||
}, | ||
"keywords": [ | ||
"github", | ||
"action", | ||
"github action", | ||
"node", | ||
"cloudflare", | ||
"pages", | ||
"test", | ||
"test coverage", | ||
"jest" | ||
], | ||
"author": "carlosdevpereira", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/carlosdevpereira/test-publish-to-cloudflare/issues" | ||
}, | ||
"homepage": "https://github.com/carlosdevpereira/test-publish-to-cloudflare#readme" | ||
} |