Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F160 - US396 - Sync with upstream fork #17

Merged
merged 41 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
adea214
Feature/refactor (#209)
shimataro Oct 30, 2022
1926ba6
update dependencies (#211)
shimataro Oct 30, 2022
fc21805
Update nodejs version to 16 (#208) (#216)
shimataro Oct 30, 2022
53a7c26
Feature/runners (#217)
shimataro Oct 30, 2022
bcb314e
fix usage of rsync (#218)
shimataro Oct 30, 2022
1512ade
Feature/GitHub key (#122)
shimataro Nov 2, 2022
a3a8a38
update dependencies (#220)
shimataro Nov 2, 2022
193316a
version 2.4.0 (#221)
shimataro Nov 2, 2022
86a65fd
Merge pull request #222 from shimataro/develop
shimataro Nov 2, 2022
7cccbd3
add cleanup process (#224)
shimataro Dec 19, 2022
da84e6b
Feature/ci (#225)
shimataro Dec 20, 2022
c8a5755
set workflow name (#226)
shimataro Dec 21, 2022
d3bad32
update dependencies (#227)
shimataro Dec 21, 2022
0037643
update dependencies (#228)
shimataro Dec 24, 2022
7036694
version 2.5.0 (#229)
shimataro Dec 24, 2022
02d189f
Merge pull request #230 from shimataro/develop
shimataro Dec 24, 2022
18601dc
Feature/update gh key (#238)
shimataro Mar 24, 2023
699cc3a
version 2.5.1 (#239)
shimataro Mar 24, 2023
685d0f2
Merge pull request #240 from shimataro/develop
shimataro Mar 24, 2023
f5671c0
update dependencies (#241)
shimataro Mar 24, 2023
2983fc4
Feature/remove old runner (#249)
shimataro Oct 9, 2023
31d4b8b
backup & restore (#251)
shimataro Oct 10, 2023
6948892
use module files (#252)
shimataro Oct 10, 2023
00676f1
use `os.homedir()` in order to get home directory (#253)
shimataro Oct 10, 2023
51874aa
exit if differ (#254)
shimataro Oct 10, 2023
ab731d2
update dependencies (#255)
shimataro Oct 10, 2023
ccfb951
fix; files that didn't backed up is not removed in "post" phase (#256)
shimataro Oct 11, 2023
a9c5970
version 2.6.0 (#257)
shimataro Oct 11, 2023
d05e1bd
Merge pull request #258 from shimataro/develop
shimataro Oct 11, 2023
18e8292
update release script (#259)
shimataro Oct 11, 2023
b49a036
fix; JSON parse error on exit, if `if_key_exists`=`fail` and key exis…
shimataro Oct 12, 2023
f848d33
fix; release script error (#261)
shimataro Oct 12, 2023
c858f81
update dependencies (#262)
shimataro Oct 13, 2023
9e1a5e7
use cache for npm (#263)
shimataro Oct 13, 2023
38b53cb
version 2.6.1 (#264)
shimataro Oct 13, 2023
8f0e25e
Feature/node20 (#268)
shimataro Feb 11, 2024
9383557
update dependencies (#269)
shimataro Feb 11, 2024
d4fffb5
version 2.7.0 (#270)
shimataro Feb 11, 2024
ce52ab5
Merge remote-tracking branch 'upstream/v2' into v2-sync
jwj019 Jun 12, 2024
0c346c9
Remove centos checks
jwj019 Jun 12, 2024
a544954
Remove bitbucket and fix repo references
jwj019 Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ spaces_around_brackets = none
indent_brace_style = allman


# JavaScript/TypeScript
[*.{js,ts}]
indent_style = space
curly_bracket_next_line = false
indent_brace_style = K&R


# JSON/YAML
[*.{json,babelrc,code-workspace,yml,yaml}]
indent_style = space
Expand Down
47 changes: 26 additions & 21 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ parserOptions:
project: ./tsconfig.json
rules: # https://eslint.org/docs/rules/
accessor-pairs: error
array-bracket-newline: error
array-bracket-newline:
- error
- consistent
array-bracket-spacing:
- error
- never
Expand All @@ -29,9 +31,7 @@ rules: # https://eslint.org/docs/rules/
before: true
block-scoped-var: error
block-spacing: error
brace-style:
- error
- allman
brace-style: 'off' # see "@typescript-eslint/brace-style"
callback-return: error
capitalized-comments: 'off'
class-methods-use-this: error
Expand Down Expand Up @@ -87,26 +87,14 @@ rules: # https://eslint.org/docs/rules/
- below
indent:
- error
- tab
- 4
- SwitchCase: 1
indent-legacy: 'off'
init-declarations: error
jsx-quotes: error
key-spacing: error
keyword-spacing:
- error
- overrides:
catch:
after: false
for:
after: false
if:
after: false
switch:
after: false
while:
after: false
with:
after: false
line-comment-position: 'off'
linebreak-style:
- error
Expand Down Expand Up @@ -173,7 +161,7 @@ rules: # https://eslint.org/docs/rules/
- error
- max: 1
no-native-reassign: error
no-negated-condition: error
no-negated-condition: 'off'
no-negated-in-lhs: error
no-nested-ternary: error
no-new: error
Expand Down Expand Up @@ -256,7 +244,7 @@ rules: # https://eslint.org/docs/rules/
rest-spread-spacing:
- error
- never
semi: error
semi: 'off' # see "@typescript-eslint/semi"
semi-spacing: error
semi-style:
- error
Expand Down Expand Up @@ -308,8 +296,25 @@ rules: # https://eslint.org/docs/rules/

# @typescript-eslint plugin
"@typescript-eslint/ban-ts-ignore": 'off'
"@typescript-eslint/brace-style":
- error
- 1tbs
"@typescript-eslint/member-delimiter-style":
- error
- multiline:
delimiter: semi
requireLast: true
singleline:
delimiter: semi
requireLast: true
"@typescript-eslint/no-empty-interface": 'off'
"@typescript-eslint/no-floating-promises": error
"@typescript-eslint/no-use-before-define":
- error
- functions: false
"@typescript-eslint/strict-boolean-expressions": error
"@typescript-eslint/semi": error
"@typescript-eslint/strict-boolean-expressions":
- error
- allowString: false
allowNumber: false
allowNullableObject: false
25 changes: 25 additions & 0 deletions .github/actions/cache-npm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
name: Cache NPM
description: Composite action (cache NPM)

runs:
using: composite
steps:
# https://github.com/actions/cache/blob/master/examples.md#node---npm
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
- name: Get NPM cache directory
run: echo "NPM_CACHE_DIRECTORY=$(npm config get cache)" >> ${{ github.env }} # use "github.env" instead of "github.output"; if use "github.output", "Warning: Input required and not supplied: path" is displayed on post-process
shell: pwsh # use PowerShell; Bash doesn't work on Windows because the value of "github.env" is like "D:\a\_temp\_runner_file_commands\set_env_XXX".

- name: Get Node.js version
run: echo "NODEJS_VERSION=$(node -v)" >> ${{ github.env }}
shell: pwsh

- name: Cache NPM modules
uses: actions/cache@v3
with:
path: ${{ env.NPM_CACHE_DIRECTORY }}
key: npm-${{ runner.os }}-${{ runner.arch }}-${{ env.NODEJS_VERSION }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-${{ runner.os }}-${{ runner.arch }}-${{ env.NODEJS_VERSION }}-
npm-${{ runner.os }}-${{ runner.arch }}
20 changes: 13 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,31 @@ jobs:
strategy:
matrix:
os:
- Windows-2019
- macOS-10.15
- Ubuntu-18.04
- Ubuntu-20.04
- windows-2019
- windows-2022
- macos-11
- macos-12
- ubuntu-20.04
- ubuntu-22.04
nodejs:
- 12
- 20
fail-fast: false
steps:
- name: Turn off auto-crlf
run: git config --global core.autocrlf false
- name: Checkout source codes
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.nodejs }}
- name: Cache NPM
uses: ./.github/actions/cache-npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Exit if differ (forgot to commit dist dir?)
run: git diff --exit-code --quiet
- name: Verify
run: npm run verify
215 changes: 215 additions & 0 deletions .github/workflows/reusable-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
name: Reusable workflow (verify)

on:
workflow_call:
inputs:
os:
required: true
type: string
description: host OS that CI 'runs-on'
docker_image:
required: false
type: string
default: ""
description: Docker image name
package_installation_command:
required: false
type: string
default: ""
description: package installation command
secrets:
SSH_KEY_PEM:
required: true
description: SSH private key (PEM format)
SSH_KEY_PKCS8:
required: true
description: SSH private key (PKCS8 format)
SSH_KEY_RFC4716:
required: true
description: SSH private key (RFC4716 format)

jobs:
ssh-pem:
name: Connect to github.com (PEM format)
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp

ssh-pkcs8:
name: Connect to github.com (PKCS8 format)
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PKCS8 }}
known_hosts: unnecessary
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp

ssh-rfc4716:
name: Connect to github.com (RFC4716 format)
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_RFC4716 }}
known_hosts: unnecessary
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp

key_if_exists_replace-key_exists:
name: if_key_exists=replace / key exists
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key (dummy)
uses: ./.
with:
key: "dummy" # replaced
known_hosts: unnecessary
- name: Install SSH key (replaces existing key)
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
if_key_exists: replace
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp

key_if_exists_replace-key_doesnt_exist:
name: if_key_exists=replace / key doesn't exist
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
if_key_exists: replace
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp

key_if_exists_ignore-key_exists:
name: if_key_exists=ignore / key exists
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
- name: Install SSH key (does nothing)
uses: ./.
with:
key: "dummy" # ignored
known_hosts: unnecessary
if_key_exists: ignore
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp

key_if_exists_ignore-key_doesnt_exist:
name: if_key_exists=ignore / key doesn't exist
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
if_key_exists: ignore
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp

key_if_exists_fail-key_exists:
name: if_key_exists=fail / key exists
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
- name: Install SSH key (fails)
uses: ./.
with:
key: "dummy" # fails
known_hosts: unnecessary
if_key_exists: fail
continue-on-error: true
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp

key_if_exists_fail-key_doesnt_exist:
name: if_key_exists=fail / key doesn't exist
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
if_key_exists: fail
- name: git clone through SSH
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp
Loading
Loading