Skip to content

Commit

Permalink
chore: switch to node-20 on CI and locally (#1273)
Browse files Browse the repository at this point in the history
Updates the GitHub actions to their latest versions. As part of this
upgrade, we are also upgrading our baseline Node to v20 (current LTS).
  • Loading branch information
oliverlaz authored Feb 27, 2024
1 parent 86bba03 commit b6d0ea9
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 57 deletions.
10 changes: 5 additions & 5 deletions .github/actions/rn-bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ runs:
- run: echo "IMAGE=${ImageOS}-${ImageVersion}" >> $GITHUB_ENV
shell: bash

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
if: ${{ env.INSTALL_NODE == 'true' }}
with:
node-version: 18.x
node-version: 20.x
cache: 'yarn'

- name: Install Yarn Dependencies
Expand All @@ -23,7 +23,7 @@ runs:
shell: bash

- name: Cache pods
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ env.INSTALL_PODS == 'true' }}
with:
path: sample-apps/react-native/dogfood/ios/Pods
Expand All @@ -48,7 +48,7 @@ runs:
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
if: ${{ env.INSTALL_JAVA == 'true' }}
with:
distribution: 'zulu'
Expand All @@ -62,7 +62,7 @@ runs:
shell: bash

# Retrieve the cached emulator snapshot
- uses: actions/cache@v3
- uses: actions/cache@v4
if: ${{ env.INSTALL_ANDROID_EMULATOR == 'true' }}
id: avd-cache
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/deploy-react-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,20 @@ jobs:
VITE_STREAM_KEY: ${{ vars.STREAM_API_KEY_SAMPLE_APPS }}
VITE_STREAM_SECRET: ${{ secrets.STREAM_SECRET_SAMPLE_APPS }}
VITE_EGRESS_SENTRY_DNS: ${{ secrets.EGRESS_SENTRY_DNS }}
VITE_VIDEO_DEMO_SENTRY_DNS: ${{secrets.VIDEO_DEMO_SENTRY_DNS}}
VITE_TOKEN_PROVIDER_URL: ${{secrets.TOKEN_PROVIDER_URL}}
PRONTO_SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
EGRESS_SENTRY_AUTH_TOKEN: ${{ secrets.EGRESS_SENTRY_AUTH_TOKEN }}
MODE: ${{ github.ref_name == 'main' && 'production' || 'preview' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: 'yarn'

- name: Install Dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docusaurus-javascript-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Node Setup
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 20.x

- name: Push JavaScript documentation
uses: GetStream/push-stream-chat-docusaurus-action@main
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/docusaurus-react-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
name: Push React docusaurus documentation
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

on:
push:
Expand All @@ -14,14 +12,14 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Node Setup
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 20.x

- name: Push React SDK documentation
uses: GetStream/push-stream-chat-docusaurus-action@main
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/docusaurus-react-native-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
name: Push React Native docusaurus documentation
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

on:
push:
Expand All @@ -14,14 +12,14 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Node Setup
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 20.x

- name: Push React Native SDK documentation
uses: GetStream/push-stream-chat-docusaurus-action@main
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/egress-composite-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,21 @@ on:
env:
VITE_STREAM_API_KEY: ${{ vars.EGRESS_STREAM_API_KEY }}
VITE_STREAM_USER_TOKEN: ${{ secrets.EGRESS_USER_TOKEN }}
STREAM_SDK_TEST_APP: ${{ secrets.STREAM_SDK_TEST_APP }}
STREAM_SDK_TEST_ACCOUNT_EMAIL: ${{ secrets.STREAM_SDK_TEST_ACCOUNT_EMAIL }}
STREAM_SDK_TEST_ACCOUNT_PASSWORD: ${{ secrets.STREAM_SDK_TEST_ACCOUNT_PASSWORD }}
STREAM_SDK_TEST_ACCOUNT_OTP_SECRET: ${{ secrets.STREAM_SDK_TEST_ACCOUNT_OTP_SECRET }}

jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

Expand All @@ -58,13 +54,6 @@ jobs:
- name: Install Playwright system dependencies (always)
run: npx playwright install-deps

# - name: Authenticate stream-video-buddy
# uses: nick-fields/[email protected]
# with:
# timeout_minutes: 5
# max_attempts: 2
# command: yarn workspace @stream-io/egress-composite buddy auth

- name: Run Playwright tests
run: yarn workspace @stream-io/egress-composite test:e2e

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/react-native-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/actions/rn-bootstrap
timeout-minutes: 15
Expand All @@ -55,7 +55,7 @@ jobs:
timeout-minutes: 60
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/actions/rn-bootstrap
timeout-minutes: 20
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
timeout-minutes: 100
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/actions/rn-bootstrap
timeout-minutes: 20
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/actions/rn-bootstrap
timeout-minutes: 15
Expand All @@ -136,7 +136,7 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/actions/rn-bootstrap
timeout-minutes: 15
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
timeout-minutes: 100
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/actions/rn-bootstrap
timeout-minutes: 15
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/actions/rn-bootstrap
timeout-minutes: 15
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
STREAM_API_KEY: ${{ vars.CLIENT_TEST_API_KEY }}
STREAM_SECRET: ${{ secrets.CLIENT_TEST_SECRET }}

Expand All @@ -23,18 +22,18 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: 'yarn'

- name: ESLint Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: './.eslintcache'
key: ${{ runner.os }}-eslintcache-${{ github.ref_name }}-${{ hashFiles('.eslintcache') }}
Expand All @@ -53,6 +52,3 @@ jobs:

- name: Build packages
run: NODE_ENV=production yarn build:all

# - name: SonarCloud Scan
# uses: sonarsource/sonarcloud-github-action@master
2 changes: 1 addition & 1 deletion .github/workflows/vale-doc-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Vale doc linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: errata-ai/vale-action@reviewdog
with:
version: 2.30.0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/version-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: 'yarn'

- name: ESLint Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: './.eslintcache'
key: ${{ runner.os }}-eslintcache-${{ github.ref_name }}-${{ hashFiles('.eslintcache') }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v20

0 comments on commit b6d0ea9

Please sign in to comment.