Skip to content

Commit

Permalink
feat: Danger CI
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjoeoui committed Dec 30, 2023
1 parent 8e9f834 commit 2d7904a
Show file tree
Hide file tree
Showing 4 changed files with 590 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Danger CI
on: pull_request

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Cache pnpm
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Node Dependencies
run: pnpm install

- name: Danger CI
run: pnpm danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions dangerfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { message, danger } from "danger";

const modifiedMD = danger.git.modified_files.join("- ");
message("Changed Files in this PR: \n - " + modifiedMD);
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.16",
"concurrently": "^8.2.2",
"danger": "^11.3.1",
"dotenv": "^16.3.1",
"electron": "^27.1.3",
"electron-builder": "^24.9.1",
Expand Down
Loading

0 comments on commit 2d7904a

Please sign in to comment.