Upgrade github actions

This commit is contained in:
Fedor Indutny 2024-06-27 14:48:40 -07:00 committed by GitHub
parent 3ed63edbc8
commit 74b9903402
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 65 additions and 57 deletions

View file

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
token: ${{ secrets.AUTOMATED_GITHUB_PAT }} token: ${{ secrets.AUTOMATED_GITHUB_PAT }}
repository: signalapp/Signal-Backport-Action-Private repository: signalapp/Signal-Backport-Action-Private

View file

@ -25,12 +25,12 @@ jobs:
run: uname -a run: uname -a
- name: Clone Desktop repo - name: Clone Desktop repo
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: '20.14.0' node-version-file: '.nvmrc'
- name: Install global dependencies - name: Install global dependencies
run: npm install -g npm@10.2.5 run: npm install -g npm@10.2.5
@ -39,7 +39,7 @@ jobs:
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
@ -130,13 +130,13 @@ jobs:
- name: Upload benchmark logs on failure - name: Upload benchmark logs on failure
if: failure() if: failure()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: logs name: logs
path: artifacts path: artifacts
- name: Clone benchmark repo - name: Clone benchmark repo
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
repository: 'signalapp/Signal-Desktop-Benchmarks-Private' repository: 'signalapp/Signal-Desktop-Benchmarks-Private'
path: 'benchmark-results' path: 'benchmark-results'

View file

@ -18,21 +18,15 @@ jobs:
steps: steps:
- run: lsb_release -a - run: lsb_release -a
- run: uname -a - run: uname -a
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - name: Setup node.js
uses: actions/setup-node@v4
with: with:
node-version: '20.14.0' node-version-file: '.nvmrc'
- run: npm install -g npm@10.2.5 - run: npm install -g npm@10.2.5
- name: Cache Desktop node_modules
id: cache-desktop-modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
- name: Restore cached .eslintcache and tsconfig.tsbuildinfo - name: Restore cached .eslintcache and tsconfig.tsbuildinfo
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
id: cache-lint id: cache-lint
with: with:
path: | path: |
@ -40,6 +34,13 @@ jobs:
tsconfig.tsbuildinfo tsconfig.tsbuildinfo
key: lint-${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**', '.eslintrc.js', '.eslint/**', 'tsconfig.json') }} key: lint-${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**', '.eslintrc.js', '.eslint/**', 'tsconfig.json') }}
- name: Cache Desktop node_modules
id: cache-desktop-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
- name: Install Desktop node_modules - name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true' if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: npm ci run: npm ci
@ -59,7 +60,7 @@ jobs:
- run: git diff --exit-code - run: git diff --exit-code
- name: Update cached .eslintcache and tsconfig.tsbuildinfo - name: Update cached .eslintcache and tsconfig.tsbuildinfo
uses: actions/cache/save@v3 uses: actions/cache/save@v4
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
path: | path: |
@ -75,19 +76,21 @@ jobs:
steps: steps:
- run: uname -a - run: uname -a
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - name: Setup node.js
uses: actions/setup-node@v4
with: with:
node-version: '20.14.0' node-version-file: '.nvmrc'
- run: npm install -g npm@10.2.5 - run: npm install -g npm@10.2.5
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
- name: Install Desktop node_modules - name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true' if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: npm ci run: npm ci
@ -115,7 +118,7 @@ jobs:
- name: Upload artifacts on failure - name: Upload artifacts on failure
if: failure() if: failure()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
path: artifacts path: artifacts
@ -127,20 +130,22 @@ jobs:
steps: steps:
- run: lsb_release -a - run: lsb_release -a
- run: uname -a - run: uname -a
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - name: Setup node.js
uses: actions/setup-node@v4
with: with:
node-version: '20.14.0' node-version-file: '.nvmrc'
- run: sudo apt-get install xvfb - run: sudo apt-get install xvfb
- run: npm install -g npm@10.2.5 - run: npm install -g npm@10.2.5
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
- name: Install Desktop node_modules - name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true' if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: npm ci run: npm ci
@ -177,7 +182,7 @@ jobs:
- name: Upload artifacts on failure - name: Upload artifacts on failure
if: failure() if: failure()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
path: artifacts path: artifacts
@ -194,10 +199,11 @@ jobs:
- run: systeminfo - run: systeminfo
- run: git config --global core.autocrlf false - run: git config --global core.autocrlf false
- run: git config --global core.eol lf - run: git config --global core.eol lf
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - name: Setup node.js
uses: actions/setup-node@v4
with: with:
node-version: '20.14.0' node-version-file: '.nvmrc'
- run: npm install -g npm@10.2.5 node-gyp@10.0.1 - run: npm install -g npm@10.2.5 node-gyp@10.0.1
# Set things up so @nodert-win10-rs4 dependencies build properly # Set things up so @nodert-win10-rs4 dependencies build properly
@ -208,10 +214,11 @@ jobs:
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
- name: Install Desktop node_modules - name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true' if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: npm ci run: npm ci
@ -250,7 +257,7 @@ jobs:
- name: Upload artifacts on failure - name: Upload artifacts on failure
if: failure() if: failure()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
path: artifacts path: artifacts
@ -264,10 +271,13 @@ jobs:
working-directory: sticker-creator working-directory: sticker-creator
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - name: Setup node.js
uses: actions/setup-node@v4
with: with:
node-version: '18.17.1' node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install Sticker Creator node_modules - name: Install Sticker Creator node_modules
run: npm ci run: npm ci
@ -300,12 +310,12 @@ jobs:
run: uname -a run: uname -a
- name: Clone Desktop repo - name: Clone Desktop repo
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: '20.14.0' node-version-file: '.nvmrc'
- name: Install global dependencies - name: Install global dependencies
run: npm install -g npm@10.2.5 run: npm install -g npm@10.2.5
@ -314,7 +324,7 @@ jobs:
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
@ -342,7 +352,7 @@ jobs:
- name: Upload mock server test logs on failure - name: Upload mock server test logs on failure
if: failure() if: failure()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: logs name: logs
path: artifacts path: artifacts

View file

@ -10,12 +10,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 # fetch all history fetch-depth: 0 # fetch all history
- uses: actions/setup-node@v3 - name: Setup node.js
uses: actions/setup-node@v4
with: with:
node-version: '20.14.0' node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- run: npm install -g npm@10.2.5 - run: npm install -g npm@10.2.5
- name: Cache danger node_modules - name: Cache danger node_modules
id: cache-desktop-modules id: cache-desktop-modules

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
token: ${{ secrets.AUTOMATED_GITHUB_PAT }} token: ${{ secrets.AUTOMATED_GITHUB_PAT }}
repository: signalapp/Signal-Notes-Action-Private repository: signalapp/Signal-Notes-Action-Private

View file

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
token: ${{ secrets.AUTOMATED_GITHUB_PAT }} token: ${{ secrets.AUTOMATED_GITHUB_PAT }}
repository: signalapp/Signal-Release-Notes-Action-Private repository: signalapp/Signal-Release-Notes-Action-Private

View file

@ -13,21 +13,16 @@ jobs:
runs-on: ubuntu-latest-8-cores runs-on: ubuntu-latest-8-cores
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - name: Setup node.js
uses: actions/setup-node@v4
with: with:
node-version: '20.14.0' node-version-file: '.nvmrc'
cache: 'npm' cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install global dependencies - name: Install global dependencies
run: npm install -g npm@10.2.5 run: npm install -g npm@10.2.5
- name: Cache Desktop node_modules
id: cache-desktop-modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
- name: Install Desktop node_modules - name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: npm ci run: npm ci
env: env:
CHILD_CONCURRENCY: 1 CHILD_CONCURRENCY: 1