OSS-Docs-Tools / code-owner-self-merge

A GitHub Action for letting CODEOWNERS merge PRs via green PR reviews
MIT License
53 stars 16 forks source link

ci: Update actions and set minimal Node.js version to v14 #44

Closed hyperupcall closed 7 months ago

hyperupcall commented 7 months ago

In CI, npx jest fails:

$ npx jest
npx: installed 285 in 11.833s
Unexpected token .

This is because actions/setup-node@v1 uses Node.js v10 by default:

$ mise exec node@10 -- npx jest
npx: installed 285 in 15.951s
Unexpected token .

However, tests pass with a minimal Node.js version of v14:

$ mise exec node@14 -- npx jest
npx: installed 285 in 8.205s
PASS  ./index.test.js
  ✓ determine who owns a set of files (13 ms)
  ✓ real world (2 ms)
  ✓ real world 2 (2 ms)
  ✓ real world with labels (2 ms)
  ✓ deciding if someone has access to merge (5 ms)
  githubLoginIsInCodeowners
    ✓ allows folks found in the codeowners (1 ms)
    ✓ ignores case (1 ms)
    ✓ denies other accounts (2 ms)
    ✓ denies subsets of existing accounts (1 ms)

Test Suites: 1 passed, 1 total
Tests:       9 passed, 9 total
Snapshots:   0 total
Time:        0.738 s, estimated 1 s
Ran all test suites.

This PR updates the actions and sets v14 as the default Node.js version installed. Both v14 and v16 are both EOL, so naturally the major version could be bumped if it is not constrained by compatibility concerns.

orta commented 7 months ago

Great! Thanks

dmrapp1186 commented 7 months ago

Quit Destroying My Data.. Notice of Infringement and Sata Theft

On Apr 11, 2024, at 07:11, Orta Therox @.***> wrote:

Great! Thanks

— Reply to this email directly, view it on GitHub https://github.com/OSS-Docs-Tools/code-owner-self-merge/pull/44#issuecomment-2049451253, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5UI7DS6L3KLVD5VVG44KB3Y4ZVWPAVCNFSM6AAAAABGBVAVD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZGQ2TCMRVGM. You are receiving this because you are subscribed to this thread.