Skip to content

Commit

Permalink
fix: update CI to maintained node.js releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ForbesLindesay committed Sep 25, 2024
1 parent 8035c02 commit 4cd0140
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 435 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
refs:
- &container
docker:
- image: node:14
- image: node:20
environment:
PG_URL: 'postgres://test-user@localhost:5432/test-db'
MYSQL_URL: 'mysql://test-user:password@localhost:3306/test-db'
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows-src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import {
interpolate,
} from 'github-actions-workflow-builder/expression';

const DEFAULT_NODE_VERSION = '20.x';
const ALL_NODE_VERSIONS = ['18.x', '20.x', '22.x'];
const INTEGRATION_TEST_NODE_VERSIONS = ['18.x', '22.x'];

export function yarnInstallWithCache(nodeVersion: Expression<string>): Steps {
return ({use, run}) => {
const {
Expand All @@ -30,7 +34,9 @@ export function yarnInstallWithCache(nodeVersion: Expression<string>): Steps {
run('yarn install --prefer-offline');
};
}
export function setup(nodeVersion: Expression<string> = '14.x'): Steps {
export function setup(
nodeVersion: Expression<string> = DEFAULT_NODE_VERSION,
): Steps {
return ({use, add}) => {
use('actions/checkout@v2');
use('actions/setup-node@v1', {
Expand Down Expand Up @@ -121,7 +127,7 @@ export default createWorkflow(({setWorkflowName, addTrigger, addJob}) => {

const {node} = setBuildMatrix(
{
node: ['14.x', '16.x', '18.x'],
node: ALL_NODE_VERSIONS,
},
{failFast: false},
);
Expand All @@ -140,7 +146,7 @@ export default createWorkflow(({setWorkflowName, addTrigger, addJob}) => {

const {node, pg} = setBuildMatrix(
{
node: ['14.x', '18.x'],
node: INTEGRATION_TEST_NODE_VERSIONS,
pg: [
// '9.6.19-alpine', -- unsupported by pg-migrations
'10.14-alpine',
Expand Down Expand Up @@ -168,7 +174,7 @@ export default createWorkflow(({setWorkflowName, addTrigger, addJob}) => {

const {node, mysql} = setBuildMatrix(
{
node: ['14.x', '18.x'],
node: INTEGRATION_TEST_NODE_VERSIONS,
mysql: ['5.6.51', '5.7.33', '8.0.23'],
},
{failFast: false},
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -30,7 +30,7 @@ jobs:
${{steps.step_3.outputs.dir}}
node_modules
packages/*/node_modules
key: ${{runner.os}}-14.x-${{hashFiles('yarn.lock')}}-2
key: ${{runner.os}}-20.x-${{hashFiles('yarn.lock')}}-2
- run: yarn install --prefer-offline
- name: Enable Cache
uses: actions/cache@v2
Expand Down Expand Up @@ -163,9 +163,9 @@ jobs:
strategy:
matrix:
node:
- 14.x
- 16.x
- 18.x
- 20.x
- 22.x
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -198,8 +198,9 @@ jobs:
strategy:
matrix:
node:
- 14.x
&a1
- 18.x
- 22.x
pg:
- 10.14-alpine
- 11.9-alpine
Expand Down Expand Up @@ -239,9 +240,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 14.x
- 18.x
node: *a1
mysql:
- 5.6.51
- 5.7.33
Expand Down Expand Up @@ -279,7 +278,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -291,7 +290,7 @@ jobs:
${{steps.step_3.outputs.dir}}
node_modules
packages/*/node_modules
key: ${{runner.os}}-14.x-${{hashFiles('yarn.lock')}}-2
key: ${{runner.os}}-20.x-${{hashFiles('yarn.lock')}}-2
- run: yarn install --prefer-offline
- run: yarn prettier:check
lint:
Expand All @@ -302,7 +301,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -314,7 +313,7 @@ jobs:
${{steps.step_3.outputs.dir}}
node_modules
packages/*/node_modules
key: ${{runner.os}}-14.x-${{hashFiles('yarn.lock')}}-2
key: ${{runner.os}}-20.x-${{hashFiles('yarn.lock')}}-2
- run: yarn install --prefer-offline
- name: "Load output: ${{needs.build.outputs.output}}"
uses: actions/download-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -30,7 +30,7 @@ jobs:
${{steps.step_3.outputs.dir}}
node_modules
packages/*/node_modules
key: ${{runner.os}}-14.x-${{hashFiles('yarn.lock')}}-2
key: ${{runner.os}}-20.x-${{hashFiles('yarn.lock')}}-2
- run: yarn install --prefer-offline
- name: Enable Cache
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion packages/websql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "./lib/index.d.ts",
"dependencies": {
"@databases/websql-core": "^0.0.0",
"websql": "^1.0.0"
"websql": "^2.0.3"
},
"scripts": {},
"repository": "https://github.com/ForbesLindesay/atdatabases/tree/master/packages/websql",
Expand Down
Loading

0 comments on commit 4cd0140

Please sign in to comment.