Skip to content

Commit

Permalink
Merge #502
Browse files Browse the repository at this point in the history
502: ci: upgrade node to version 18 r=curquiza a=mdubus

# Pull Request

## What does this PR do?
Upgrade node version to v18 in the CI.
This is required to upgrade packages to their latest version (and potentially fix vulnerability issues)
It also upgrades Cypress to its latest, as it is required to work along with its latest GitHub action

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Morgane Dubus <[email protected]>
  • Loading branch information
meili-bors[bot] and mdubus authored May 7, 2024
2 parents 3061a8a + e74fb66 commit bd1fcd5
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 79 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
build-project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup node and cache
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Check release validity
Expand Down
49 changes: 25 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,50 +14,50 @@ jobs:
runs-on: ubuntu-latest
name: linter-check
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- name: Install dev dependencies
run: yarn --dev
- name: Run style check
run: yarn lint && yarn prettier-check
cypress_no_meilisearch:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge
image: cypress/browsers:latest
options: --user 1001
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup node and cache
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Install dependencies
run: yarn
- name: Test no meilisearch running
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v6
with:
start: yarn start:ci
wait-on: 'http://0.0.0.0:3000'
command: yarn cy:run:test-no-meilisearch
config-file: cypress.config.js
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cypress/videos
cypress_meilisearch-no-api-key:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge
image: cypress/browsers:latest
options: --user 1001
services:
meilisearch:
Expand All @@ -67,38 +67,39 @@ jobs:
ports:
- '7700:7700'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup node and cache
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Install dependencies
run: yarn
- name: Test
uses: cypress-io/github-action@v4
uses: cypress-io/github-action@v6
env:
CYPRESS_host: http://meilisearch:7700
with:
start: yarn start:ci
wait-on: 'http://0.0.0.0:3000'
wait-on-timeout: 120
command: yarn cy:run
config-file: cypress.config.js
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cypress/videos
cypress_meilisearch-api-key:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge
image: cypress/browsers:latest
options: --user 1001
services:
meilisearch:
Expand All @@ -109,30 +110,30 @@ jobs:
ports:
- '7700:7700'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup node and cache
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Install dependencies
run: yarn
- name: Test
uses: cypress-io/github-action@v4
uses: cypress-io/github-action@v6
env:
CYPRESS_host: http://meilisearch:7700
with:
start: yarn start:ci
wait-on: 'http://0.0.0.0:3000'
command: yarn cy:run:test-api-key-required
config-file: cypress.config.js
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@storybook/preset-create-react-app": "^4.1.2",
"@storybook/react": "^6.5.14",
"@svgr/cli": "^6.5.1",
"cypress": "^12.3.0",
"cypress": "^13.8.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-cypress": "^2.12.1",
Expand Down
Loading

0 comments on commit bd1fcd5

Please sign in to comment.