-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 25639ca
Showing
25 changed files
with
55,507 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 @@ | ||
* text=auto eol=lf |
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 @@ | ||
custom: ["https://www.paypal.com/donate/?hosted_button_id=CCEAVYA8DUFD8"] |
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,51 @@ | ||
name: Check dist | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- releases/* | ||
paths-ignore: | ||
- '**.md' | ||
push: | ||
branches: | ||
- main | ||
- releases/* | ||
paths-ignore: | ||
- '**.md' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-dist: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup nodejs 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Rebuild dist/ | ||
run: npm run build | ||
|
||
- name: Compare actual and expected dist/ | ||
id: diff | ||
run: | | ||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
echo "detected uncommited changes after build:" | ||
git diff | ||
exit 1 | ||
fi | ||
- name: Upload expected dist/ | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
with: | ||
name: dist | ||
path: dist/ |
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,82 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- releases/* | ||
paths-ignore: | ||
- '**.md' | ||
push: | ||
branches: | ||
- main | ||
- releases/* | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup nodejs 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Check code format | ||
run: npm run format-check | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm run test | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
runs-on: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.runs-on }} | ||
needs: build | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run local action | ||
uses: ./ | ||
id: replace-tokens | ||
with: | ||
sources: | | ||
**/*.json;!**/*.dev.json;!**/vars.json => _tmp/*.json | ||
**/*.xml;!**.dev.xml => _tmp/*.xml | ||
**/*.yml => _tmp/*.yml | ||
variables: > | ||
[ | ||
${{ toJSON(vars) }}, | ||
${{ toJSON(secrets) }}, | ||
{ "VAR2": "#{inline}#value2", "inline": "inline_" }, | ||
${{ toJSON(format('@{0}/tests/data/vars.json', github.workspace)) }}, | ||
"$ENV_VARS" | ||
] | ||
root: ${{ github.workspace }}/tests | ||
log-level: debug | ||
recursive: true | ||
transforms: true | ||
env: | ||
ENV_VARS: '{ "VAR4": "env_value4" }' | ||
|
||
- name: Check action outputs | ||
run: | | ||
echo "defaults : ${{ steps.replace-tokens.outputs.defaults }}" | ||
echo "files : ${{ steps.replace-tokens.outputs.files }}" | ||
echo "replaced : ${{ steps.replace-tokens.outputs.replaced }}" | ||
echo "tokens : ${{ steps.replace-tokens.outputs.tokens }}" | ||
echo "transforms: ${{ steps.replace-tokens.outputs.transforms }}" |
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,3 @@ | ||
.local/ | ||
.vscode/ | ||
node_modules/ |
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,2 @@ | ||
dist/ | ||
node_modules/ |
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,12 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"endOfLine": "lf", | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"arrowParens": "avoid", | ||
"parser": "typescript" | ||
} |
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,22 @@ | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2024 Guillaume ROUCHON | ||
|
||
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. |
Oops, something went wrong.