Skip to content

Commit

Permalink
chore: set Python version in CI.yml (#1530)
Browse files Browse the repository at this point in the history
- update actions/checkout, actions/cache actions/setup-node to latest version in CI.yml
- set Python version to 3.11 in CI.yml to prevent errors on macos-latest due to `diskutils` being deprecated in Python 3.12 (see nodejs/node-gyp#2869)
  • Loading branch information
jeremy-code authored Nov 25, 2023
1 parent 4920d45 commit 4c84ecc
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
paths-ignore:
- "**/*.md"

env:
PYTHON_VERSION: "3.11"

jobs:
tests:
runs-on: ${{ matrix.os }}
Expand All @@ -22,21 +25,25 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache npm packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js 18
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
version: 18
node-version: 18
cache: "npm"
- name: Cache Node modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -64,24 +71,28 @@ jobs:
]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: get-npm-version
id: package-version
uses: pchynoweth/[email protected]
- name: Cache npm packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js 18
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
version: 18
node-version: 18
cache: "npm"
- name: Cache Node modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
Expand Down

0 comments on commit 4c84ecc

Please sign in to comment.