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

Build and Test Supported Node Versions #893

Merged
merged 3 commits into from
Mar 30, 2023
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
40 changes: 30 additions & 10 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.13.0"
node-version-file: .nvmrc
cache: npm

- name: Upgrade npm
Expand All @@ -33,10 +33,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.13.0"
node-version-file: .nvmrc
cache: npm

- name: Upgrade npm
Expand All @@ -51,7 +51,27 @@ jobs:
- name: Run tests
env:
API_KEY: ${{ secrets.API_KEY }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
npm run test
npm run coverage-report
run: npm run test

test-earliest-node-engine-support:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.0.0" # specified in the package.json engines.node field
cache: npm

- name: Upgrade npm
run: npm install -g npm

- name: Install dependencies
run: npm install --immutable --ignore-scripts

- name: Gen ABI
run: npm run abi-type-gen

- name: Run tests
env:
API_KEY: ${{ secrets.API_KEY }}
run: npm run test
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.13.0"
node-version-file: .nvmrc
cache: npm

- name: Upgrade npm
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.11.0
node-version-file: .nvmrc
- name: Upgrade npm
run: npm install -g npm
- run: npm ci
- run: npm test
- run: npm run build
Expand All @@ -28,8 +30,10 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.11.0
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org/
- name: Upgrade npm
run: npm install -g npm
- run: npm ci
- run: npm run build
- run: npm publish
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
"sdk",
"smart-contracts"
],
"engines": {
"node": ">=16.0.0"
},
"lint-staged": {
"package.json": [
"prettier-package-json --write"
Expand Down