Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1dd1bcd

Browse files
pieralukaszlukaszpiera
andauthored
chore: upgrade Node.js version in CI workflows and update action versions to latest (react-dnd#3652)
* chore: upgrade Node.js version in CI workflows and update action versions to latest * chore: add cache-dependency-path for yarn version check in CI workflow * chore: remove cache configuration from version check workflow * chore: enable Corepack and configure Yarn settings in CI workflow * chore: add yarn install step in CI workflow * chore: restrict CI workflows to main branch for push and pull request events --------- Co-authored-by: lukaszpiera <[email protected]>
1 parent a5130d0 commit 1dd1bcd

File tree

4 files changed

+51
-41
lines changed

4 files changed

+51
-41
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
11
name: Node CI
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
310
jobs:
411
build:
512
runs-on: ubuntu-latest
613
strategy:
714
matrix:
8-
node-version: [16.x, 18.x]
15+
node-version: [20.x]
916

1017
steps:
11-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1219
with:
1320
fetch-depth: 0
1421

1522
- name: Use Node.js ${{ matrix.node-version }}
16-
uses: actions/setup-node@v1
23+
uses: actions/setup-node@v3
1724
with:
1825
node-version: ${{ matrix.node-version }}
26+
cache: 'yarn'
1927

20-
- name: Get yarn cache directory path
21-
id: yarn-cache-dir-path
22-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
23-
24-
- uses: actions/cache@v2
25-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
26-
with:
27-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
28-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29-
restore-keys: |
30-
${{ runner.os }}-yarn-
31-
32-
- run: yarn install
33-
name: Install Dependencies
28+
- name: Enable Corepack
29+
run: corepack enable
30+
31+
- name: Configure Yarn
32+
run: |
33+
yarn config set nodeLinker node-modules
34+
yarn config set enableGlobalCache false
3435
36+
- name: Install Dependencies
37+
run: yarn install
38+
3539
- name: TurboRepo local server
3640
uses: felixmosh/turborepo-gh-artifacts@v2
3741
with:
@@ -47,7 +51,4 @@ jobs:
4751
TURBO_TEAM: 'react-dnd'
4852

4953
- name: Publish coverage to codecov.io
50-
uses: codecov/[email protected]
51-
if: success() && matrix.node-version == '14.x'
52-
with:
53-
token: ${{ secrets.CODECOV_TOKEN }}
54+
uses: codecov/codecov-action@v3

.github/workflows/docsite.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@ on:
77

88
jobs:
99
deploy-documentation:
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@master
13-
- name: Use Node.js 16.x
14-
uses: actions/setup-node@v1
12+
- uses: actions/checkout@v3
13+
- name: Use Node.js 20.x
14+
uses: actions/setup-node@v3
1515
with:
16-
node-version: 16.x
16+
node-version: 20.x
17+
cache: 'yarn'
1718

1819
- run: yarn install
1920
- run: 'yarn build:'
2021
- run: yarn build:docsite
2122

2223
- name: deploy
23-
uses: peaceiris/actions-gh-pages@v2.10.1
24-
env:
25-
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
26-
PUBLISH_BRANCH: gh-pages
27-
PUBLISH_DIR: ./packages/docsite/public
24+
uses: peaceiris/actions-gh-pages@v3
25+
with:
26+
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
27+
publish_branch: gh-pages
28+
publish_dir: ./packages/docsite/public

.github/workflows/fix-dependabot.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 2
14-
persist-credentials: false # minimize exposure
14+
persist-credentials: false
1515

16-
- name: Use Node.js 14.x
17-
uses: actions/setup-node@v1
16+
- name: Use Node.js 20.x
17+
uses: actions/setup-node@v3
1818
with:
19-
node-version: '14'
19+
node-version: '20'
20+
cache: 'yarn'
2021

2122
- name: Config Git
2223
run: |

.github/workflows/version-check.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
name: Version Check
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
310
env:
4-
DEFAULT_NODE_VERSION: 16
11+
DEFAULT_NODE_VERSION: 20
512
jobs:
613
version-check:
714
runs-on: ubuntu-latest
@@ -10,7 +17,7 @@ jobs:
1017
- uses: actions/checkout@v3
1118
with:
1219
fetch-depth: 0
13-
- uses: actions/setup-node@v1
20+
- uses: actions/setup-node@v3
1421
with:
1522
node-version: ${{env.DEFAULT_NODE_VERSION}}
16-
- run: yarn version check
23+
- run: yarn version check

0 commit comments

Comments
 (0)