Skip to content

Commit

Permalink
Merge pull request #286 from ral-facilities/update-node-CI
Browse files Browse the repository at this point in the history
Update node version on CI to 20
  • Loading branch information
louise-davies authored Nov 3, 2023
2 parents 7f47a97 + 8590cbd commit 4d1afe6
Show file tree
Hide file tree
Showing 17 changed files with 272 additions and 264 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,13 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: '16.x'
# Cache yarn dependencies / restore the cached dependencies during future workflows
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'yarn'
- name: Install dependencies
# Ubuntu 16+ does not install libgconf-2-4 by default, so we need to install it ourselves (for Cypress)
run: |
npm config set scripts-prepend-node-path true
sudo apt-get install libgconf-2-4
yarn --frozen-lockfile
yarn --immutable
- name: Run linting
run: yarn lint:js
- name: Run unit tests
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: '16.x'
node-version: 20
cache: 'yarn'

- name: Build Playwright environment
run: docker build --tag playwright-test --file Dockerfile.playwright .
Expand Down
18 changes: 9 additions & 9 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .pnp.loader.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
426 changes: 213 additions & 213 deletions .yarn/releases/yarn-3.6.1.cjs → .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.44.0-sdk",
"version": "8.52.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarnPath: .yarn/releases/yarn-3.6.1.cjs
yarnPath: .yarn/releases/yarn-3.6.4.cjs
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addInitialSystemChannels } from '../../support/util';
import { addInitialSystemChannels } from '../support/util';

describe('Filtering Component', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { formatDateTimeForApi } from '../../support/util';
import { formatDateTimeForApi } from '../support/util';

function getParamsFromUrl(url: string) {
const paramsString = url.split('?')[1];
Expand Down
13 changes: 13 additions & 0 deletions cypress/e2e/table/sessions.spec.ts → cypress/e2e/sessions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ describe('Sessions', () => {
cy.clearMocks();
});
it('sends a posts a request when a user session is created', () => {
cy.window().then((window) => {
// Reference global instances set in "src/mocks/browser.js".
const { worker, rest } = window.msw;

worker.use(
rest.post('/sessions', async (req, res, ctx) => {
// return a session without popups
const sessionID = '2';
return res(ctx.status(200), ctx.json(sessionID));
})
);
});

cy.findByTestId('AddCircleIcon').click();
cy.findByLabelText('Name *').type('Session');
cy.findByLabelText('Summary').type('Summary');
Expand Down
5 changes: 1 addition & 4 deletions cypress/e2e/table/table.cy.ts → cypress/e2e/table.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
getHandleSelector,
addInitialSystemChannels,
} from '../../support/util';
import { getHandleSelector, addInitialSystemChannels } from '../support/util';

const verifyColumnOrder = (columns: string[]): void => {
for (let i = 0; i < columns.length; i++) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@
"node_modules/(?!axios)"
]
},
"packageManager": "yarn@3.6.1",
"packageManager": "yarn@3.6.4",
"devDependencies": {
"@babel/eslint-parser": "7.22.5",
"@craco/craco": "7.1.0",
"@playwright/test": "1.36.1",
"@testing-library/cypress": "8.0.7",
"@testing-library/cypress": "9.0.0",
"@testing-library/dom": "9.3.1",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "14.0.0",
Expand Down
27 changes: 18 additions & 9 deletions src/api/images.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ describe('images api functions', () => {
wrapper: hooksWrapperWithProviders(),
});

await waitFor(() => {
expect(result.current.isSuccess).toBeTruthy();
});
await waitFor(
() => {
expect(result.current.isSuccess).toBeTruthy();
},
{ timeout: 5000 }
);

const request = await pendingRequest;

Expand All @@ -42,9 +45,12 @@ describe('images api functions', () => {
wrapper: hooksWrapperWithProviders(),
});

await waitFor(() => {
expect(result.current.isSuccess).toBeTruthy();
});
await waitFor(
() => {
expect(result.current.isSuccess).toBeTruthy();
},
{ timeout: 5000 }
);

const request = await pendingRequest;

Expand All @@ -69,9 +75,12 @@ describe('images api functions', () => {
}
);

await waitFor(() => {
expect(result.current.isSuccess).toBeTruthy();
});
await waitFor(
() => {
expect(result.current.isSuccess).toBeTruthy();
},
{ timeout: 5000 }
);

const request = await pendingRequest;

Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3363,15 +3363,15 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/cypress@npm:8.0.7":
version: 8.0.7
resolution: "@testing-library/cypress@npm:8.0.7"
"@testing-library/cypress@npm:9.0.0":
version: 9.0.0
resolution: "@testing-library/cypress@npm:9.0.0"
dependencies:
"@babel/runtime": ^7.14.6
"@testing-library/dom": ^8.1.0
peerDependencies:
cypress: ^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0
checksum: e005bc1a7ec808706c57e95ed312069fb5be39ea7362900dc2a32c09f124d478ade69ebcd7df88c076e3867ab328ae6e6ce13791bdf042621ff66b56552bf74b
cypress: ^12.0.0
checksum: fbd24e8f0b8a60279b336de5f6bc0e7ad6fb31316eacab5128dacc7fccde1eb40935b90f2c3bddc7d814115fe3965c6dbf011785448cd15b5a5b0bc40ef5bb4c
languageName: node
linkType: hard

Expand Down Expand Up @@ -12355,7 +12355,7 @@ __metadata:
"@tanstack/react-query-devtools": 4.29.6
"@tanstack/react-table": 8.9.3
"@tanstack/react-virtual": beta
"@testing-library/cypress": 8.0.7
"@testing-library/cypress": 9.0.0
"@testing-library/dom": 9.3.1
"@testing-library/jest-dom": 5.16.4
"@testing-library/react": 14.0.0
Expand Down

0 comments on commit 4d1afe6

Please sign in to comment.