Skip to content

Commit

Permalink
Upgrade to node20 and use @actions/glob for globbing and hashing files (
Browse files Browse the repository at this point in the history
#564)

* Upgrade to node20 and use @actions/glob for globbing and hashing files

Also updates tsconfig target to es2022 as this [fits with node 20](https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping)

* Don't check formatting on Windows

---------

Co-authored-by: Alexandre Archambault <[email protected]>
  • Loading branch information
hugo-vrijswijk and alexarchambault authored Feb 1, 2024
1 parent a0e7cd2 commit 1254631
Show file tree
Hide file tree
Showing 11 changed files with 2,015 additions and 1,751 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"plugins": ["@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"extends": ["plugin:github/typescript"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
Expand Down Expand Up @@ -45,7 +45,6 @@
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error",
"import/no-commonjs": "warn",
"i18n-text/no-en": "off"
},
"env": {
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Build
shell: bash -l {0}
env:
NODE_OPTIONS: "--openssl-legacy-provider"
run: |
nvm use lts/hydrogen
npm install
npm ci
test "$OSTYPE" != "msys" || npm run format
npm run all
- uses: ./
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/update-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Build
shell: bash -l {0}
env:
NODE_OPTIONS: "--openssl-legacy-provider"
run: |
nvm use lts/hydrogen
npm install
npm ci
test "$OSTYPE" != "msys" || npm run format
npm run all
- name: Create Pull Request
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ To take into account extra files in the cache key, pass via `extraFiles` either
- a single path as a string
- multiple paths in a JSON array, encoded in a string

Blobs are accepted (processed by [glob-all](https://www.npmjs.com/package/glob-all)).
Blobs are accepted (processed by [@actions/glob](https://www.npmjs.com/package/@actions/glob)).

### `extraSbtFiles`

Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ inputs:
To take into account extra files in the cache key, pass via extraFiles either
- a single path as a string
- multiple paths in a JSON array, encoded in a string
Blobs are accepted (processed by [glob-all](https://www.npmjs.com/package/glob-all)).
Blobs are accepted (processed by [@actions/glob](https://www.npmjs.com/package/@actions/glob)).
default: ''
extraKey:
required: false
Expand Down Expand Up @@ -129,7 +129,7 @@ outputs:
cache-hit-ammonite:
description: 'A boolean value to indicate a match was found for the ammonite cache'
runs:
using: 'node16'
using: 'node20'
main: 'dist/restore/index.js'
post: 'dist/save/index.js'
post-if: 'success()'
Loading

0 comments on commit 1254631

Please sign in to comment.