Skip to content

Commit

Permalink
feat: Upgrade to @serverless/dashboard-plugin (#12157)
Browse files Browse the repository at this point in the history
* feat: Upgrade to @serverless/dashboard-plugin

* feat: Remove support for node12

* chore: Bump @serverless/dashboard-plugin version

* fix: Coverage on Linux action
  • Loading branch information
Mmarzex committed Sep 15, 2023
1 parent c66aad7 commit f057629
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 51 deletions.
29 changes: 6 additions & 23 deletions .github/workflows/integrate.yml
Expand Up @@ -53,7 +53,9 @@ jobs:
- name: Unit tests
# Some tests depend on TTY support, which is missing in GA runner
# Workaround taken from https://github.com/actions/runner/issues/241#issuecomment-577360161
run: script -e -c "npm test -- -b"
run: script -e -c "npm run coverage -- -b"
- name: Push coverage
run: npx codecov
- name: Packaging tests
run: npm run integration-test-run-package

Expand Down Expand Up @@ -120,38 +122,19 @@ jobs:
run: script -e -c "npm run test:isolated -- -b"

linuxNode12:
name: '[Linux] Node.js 12: Unit tests with coverage'
name: '[Linux] Node.js v12: Node version validation test'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Retrieve dependencies from cache
id: cacheNpm
uses: actions/cache@v3
with:
path: |
~/.npm
node_modules
key: npm-v12-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: npm-v12-${{ runner.os }}-${{ github.ref }}-

- name: Install Node.js and npm
uses: actions/setup-node@v3
with:
node-version: 12.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
run: |
npm update --no-save
npm update --save-dev --no-save
- name: Unit tests
# Some tests depend on TTY support, which is missing in GA runner
# Workaround taken from https://github.com/actions/runner/issues/241#issuecomment-577360161
run: script -e -c "npm run coverage"
- name: Push coverage
run: npx codecov
- name: Node version validation test
run: ./bin/serverless.js 2>&1 | grep -q "does not support"

linuxNode4:
name: '[Linux] Node.js v4: Node version validation test'
Expand Down
31 changes: 6 additions & 25 deletions .github/workflows/validate.yml
Expand Up @@ -69,7 +69,9 @@ jobs:
- name: Unit tests
# Some tests depend on TTY support, which is missing in GA runner
# Workaround taken from https://github.com/actions/runner/issues/241#issuecomment-577360161
run: script -e -c "npm test -- -b"
run: script -e -c "npm run coverage -- -b"
- name: Push coverage
run: npx codecov
- name: Packaging tests
run: npm run integration-test-run-package

Expand Down Expand Up @@ -140,40 +142,19 @@ jobs:
run: script -e -c "npm run test:isolated -- -b"

linuxNode12:
name: '[Linux] Node.js 12: Unit tests with coverage'
name: '[Linux] Node.js v12: Node version validation test'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Retrieve dependencies from cache
id: cacheNpm
uses: actions/cache@v3
with:
path: |
~/.npm
node_modules
key: npm-v12-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-v12-${{ runner.os }}-${{ github.ref }}-
npm-v12-${{ runner.os }}-refs/heads/main-
- name: Install Node.js and npm
uses: actions/setup-node@v3
with:
node-version: 12.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
run: |
npm update --no-save
npm update --save-dev --no-save
- name: Unit tests
# Some tests depend on TTY support, which is missing in GA runner
# Workaround taken from https://github.com/actions/runner/issues/241#issuecomment-577360161
run: script -e -c "npm run coverage"
- name: Push coverage
run: npx codecov
- name: Node version validation test
run: ./bin/serverless.js 2>&1 | grep -q "does not support"

linuxNode4:
name: '[Linux] Node.js v4: Node version validation test'
Expand Down
4 changes: 2 additions & 2 deletions bin/serverless.js
Expand Up @@ -13,8 +13,8 @@ if (isMainModule) EvalError.$serverlessCommandStartTime = process.hrtime();

const nodeVersionMajor = Number(process.version.split('.')[0].slice(1));
const nodeVersionMinor = Number(process.version.split('.')[1]);
const minimumSupportedVersionMajor = 12;
const minimumSupportedVersionMinor = 13;
const minimumSupportedVersionMajor = 14;
const minimumSupportedVersionMinor = 0;

if (
nodeVersionMajor < minimumSupportedVersionMajor ||
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -22,7 +22,7 @@
"sls": "./bin/serverless.js"
},
"dependencies": {
"@serverless/dashboard-plugin": "^6.2.3",
"@serverless/dashboard-plugin": "^7.0.1",
"@serverless/platform-client": "^4.3.2",
"@serverless/utils": "^6.13.1",
"abort-controller": "^3.0.0",
Expand Down

0 comments on commit f057629

Please sign in to comment.