-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add automated tests for the project and run them in CI (#94)
* only apply the original csp header to the root path * allow running the build plugin locally * add tests to confirm the plugin is working as expected * refactor: always use the relative path and don't assume the package exists in the top-level of the relative node_modules directory
- Loading branch information
1 parent
406ba4e
commit d3e2c71
Showing
11 changed files
with
2,345 additions
and
67 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,24 @@ | ||
name: CI | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
test-npm-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
- run: npm install netlify-cli -g | ||
- run: npm install | ||
- run: npm test | ||
- run: HOST='https://deploy-preview-${{ github.event.pull_request.number }}--csp-nonce.netlify.app' npm test |
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 |
---|---|---|
|
@@ -3,3 +3,6 @@ node_modules | |
|
||
# Local Netlify folder | ||
.netlify | ||
|
||
netlify/edge-functions | ||
deno.lock |
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
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
[[plugins]] | ||
package = "/" | ||
[plugins.inputs] | ||
reportOnly = false | ||
reportOnly = false | ||
|
||
[dev] | ||
publish = "site" |
Oops, something went wrong.