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

fix: update node engines to 18+, CI to test 18, 20, update eslint-config #18

Merged
merged 4 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"@jest/globals"
]
}
]
],
"node/shebang": [0, {"convertPath": null}]
},
"parserOptions": {
"ecmaVersion": 2020
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
name: CI
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

on: push
name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x]
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- name: Install modules
run: npm i
- name: Run tests
run: npm test
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm i --package-lock --package-lock-only
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: upload coverage
if: success()
uses: codecov/[email protected]
with:
name: ${{ runner.os }} node.js ${{ matrix.node-version }}
2 changes: 1 addition & 1 deletion .github/workflows/on-release-creation-publish-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
# See https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
- uses: actions/setup-node@v2
with:
node-version: "14.x"
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm test
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: publish-prerelease
on:
workflow_dispatch:
inputs:
pre-release-tag:
description: 'The pre-release tag use in the version'
required: false
default: 'pre'
dist-tag:
description: 'The dist-tag use'
required: false
default: 'next'
dependencies-to-update:
description: 'csv of dependencies to update with the dist-tag'
required: false
default: '@adobe/aio-lib-console-project-installation'
jobs:
checkout:
name: checkout
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git config user.name github-actions
git config user.email [email protected]
- uses: actions/setup-node@v1
with:
node-version: 18
- run: |
npm install
npm test
- name: Update your package.json with an npm pre-release version
id: pre-release-version
uses: adobe/[email protected]
with:
pre-release-tag: ${{ github.event.inputs.pre-release-tag }}
dependencies-to-update: ${{ github.event.inputs.dependencies-to-update }}
dependencies-to-update-version-tag: ${{ github.event.inputs.dist-tag }}
- run: echo pre-release-version - ${{ steps.pre-release-version.outputs.pre-release-version }}
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
tag: ${{ github.event.inputs.dist-tag }}
access: 'public'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ junit.xml

# OSX
.DS_Store

package-lock.json
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
package-lock=false
tag-version-prefix=""
preid="next"
Loading
Loading