signal-desktop/.github/workflows/danger.yml

36 lines
1 KiB
YAML
Raw Normal View History

2023-01-03 19:55:46 +00:00
# Copyright 2020 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only
2023-11-02 19:42:31 +00:00
name: Danger
on:
pull_request:
jobs:
danger:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
2024-06-27 21:48:40 +00:00
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history
2024-06-27 21:48:40 +00:00
- name: Setup node.js
uses: actions/setup-node@v4
with:
2024-06-27 21:48:40 +00:00
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
2024-06-24 20:14:32 +00:00
- run: npm install -g npm@10.2.5
- name: Cache danger node_modules
id: cache-desktop-modules
uses: actions/cache@v3
with:
path: danger/node_modules
2024-06-24 20:14:32 +00:00
key: danger-${{ runner.os }}-${{ hashFiles('danger/package.json', 'danger/package-lock.json') }}
- name: Install danger node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: cd danger && npm ci
- name: Run DangerJS
2024-06-24 20:14:32 +00:00
run: npm run danger:ci
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.AUTOMATED_GITHUB_PAT }}