Skip to content

Commit

Permalink
Merge pull request #556 from sir-gon/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sir-gon authored Dec 11, 2024
2 parents 9f87175 + 96607ba commit 7df2310
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 43 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,25 @@ on: # yamllint disable-line rule:truthy

jobs:
analyze:
name: Analyze
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources
# for possible analysis time improvements.
runs-on:
${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
${{ (matrix.language == 'swift' && 'macos-14') || 'ubuntu-24.04' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

build:
name: "Build Docker images"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:

lint:
name: "Run in docker: LINT"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: build
steps:
- name: Download artifact
Expand All @@ -93,7 +93,7 @@ jobs:
test:
name: "Run in docker: TEST"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: build
steps:
- name: Download artifact
Expand All @@ -113,7 +113,7 @@ jobs:
security:
name: "Snyk Container"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: build
permissions:
actions: read
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
sarif_file: 'snyk.sarif'
scan:
name: "Trivy"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: build
permissions:
actions: read
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ on: # yamllint disable-line rule:truthy
jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule
# at https://nodejs.org/en/about/releases/
permissions:
contents: read
security-events: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on: # yamllint disable-line rule:truthy
jobs:
scan:
name: gitleaks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: Markdown Lint

on: # yamllint disable-line rule:truthy
Expand All @@ -10,19 +9,27 @@ on: # yamllint disable-line rule:truthy
branches: ["main"]
workflow_dispatch:

permissions: read-all

jobs:
lint:
markdownlint:
name: Markdown Lint
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

strategy:
matrix:
node-version: [22.x]
# See supported Node.js release schedule
# at https://nodejs.org/en/about/releases/

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Node.js
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 22.x
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install -g markdownlint-cli
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/node-coverage.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
coverage:
name: NodeJS CI Coverage
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Expand All @@ -27,9 +28,6 @@ jobs:
- name: Install dependencies
run: npm ci --verbose

- name: Lint
run: npm run lint

- name: Run the tests
run: npm run jest:ci -- --coverage

Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: Node.js CI Tests

on: # yamllint disable-line rule:truthy
Expand All @@ -12,14 +11,11 @@ on: # yamllint disable-line rule:truthy

jobs:
build:
runs-on: ubuntu-latest
name: NodeJS Jest CI Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
"windows-latest",
"ubuntu-latest",
"macOS-latest"
]
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule
# at https://nodejs.org/en/about/releases/
Expand All @@ -36,8 +32,5 @@ jobs:
- name: Install dependencies
run: npm ci --verbose

- name: Lint
run: npm run lint

- name: Run the tests
run: npm run jest:ci
2 changes: 1 addition & 1 deletion .github/workflows/snyk-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on: # yamllint disable-line rule:truthy
jobs:
security:
name: Snyk Open Source (Node.js)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: YAML lint

on: # yamllint disable-line rule:truthy
Expand All @@ -12,7 +11,8 @@ on: # yamllint disable-line rule:truthy

jobs:
lint:
runs-on: ubuntu-latest
name: YAML lint
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Expand Down
27 changes: 24 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.5",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.1",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -36,13 +37,13 @@
"scripts": {
"build": "tsc -p tsconfig.prod.json",
"start": "npm run test",
"lint": "npx --yes eslint --env-info; npx --yes eslint . --color --max-warnings=0 && echo '✔ Your code looks good.'",
"jest:ci": "node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
"jest:clean": "npx --yes jest --clearCache && npx --yes watchman watch-del-all",
"jest:bruteforce": "BRUTEFORCE=true node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
"jest:watch": "node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug --watchAll",
"style:format": "npx --yes prettier --write 'src/**/*.ts'",
"style:check": "npx --yes prettier --check 'src/**/*.ts'",
"lint": "npx eslint --env-info; npx eslint . --color --max-warnings=0 && echo '✔ Your code looks good.'",
"jest:ci": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
"jest:clean": "npx jest --clearCache && npx watchman watch-del-all",
"jest:bruteforce": "cross-env BRUTEFORCE=true NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
"jest:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug --watchAll",
"style:format": "npx prettier --write 'src/**/*.ts'",
"style:check": "npx prettier --check 'src/**/*.ts'",
"test": "jest",
"update-all": "npm install $(npm outdated | cut -d' ' -f 1 | sed '1d' | xargs -I '$' echo '$@latest' | xargs echo)"
}
Expand Down

0 comments on commit 7df2310

Please sign in to comment.