Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

.github/workflows/ci.yml produces multiple deprecations #8

Open
MikeMcC399 opened this issue Jun 12, 2023 · 3 comments
Open

.github/workflows/ci.yml produces multiple deprecations #8

MikeMcC399 opened this issue Jun 12, 2023 · 3 comments

Comments

@MikeMcC399
Copy link

MikeMcC399 commented Jun 12, 2023

Following the instructions on https://cypress-workshop-ci.netlify.app/?p=generic-ci#/2 produces multiple deprecations.

The instructions are applied to a fork of cypress-io/cypress-workshop-ci-example.

Instructions

The instructions say:

Create new file .github/workflows/ci.yml and paste the following

name: ci
on: [push]
jobs:
  build-and-test:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout 🛎
        uses: actions/checkout@v2

      - name: Install dependencies 📦
        run: npm ci

      - name: Build the app 🏗
        run: npm run build

      - name: Start the app 📤
        run: npm start &

      - name: Run Cypress tests 🧪
        run: npm run cy:run

Results

  1. Cypress is configured to use the legacy version 6.7.1 in package.json
  2. package-lock.json is configured for "lockfileVersion": 1 used by npm v5 and v6. Node.js 14 was the last version with npm v6 bundled and it has been in end-of-life status since Apr 30, 2023. GitHub-hosted runners currently use Node.js 18 LTS as default.
    npm WARN old lockfile
    npm WARN old lockfile The package-lock.json file was created with an old version of npm,
    npm WARN old lockfile so supplemental metadata must be fetched from the registry.
    npm WARN old lockfile
    npm WARN old lockfile This is a one-time fix-up, please be patient...
    npm WARN old lockfile
    
  3. actions/checkout@v2 causes

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

Suggestion

Since cypress-io/cypress-workshop-ci-example is archived, no updates are possible.

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399
Copy link
Author

The deprecation notice for Node.js 12 has changed:

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

@MikeMcC399
Copy link
Author

Now there are double deprecations:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant