Skip to content

Commit

Permalink
[Gitar] Apply gitar duet on top of gitar bot PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
kageiit committed Sep 12, 2024
1 parent f95e81e commit a691cab
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/gitar-duet-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Gitar Duet

on:
push:
branches:
- 'gitar_*'

jobs:
gitar-duet:
if: github.event.head_commit.author.name == 'Gitar'
runs-on: ubuntu-latest
name: Gitar Duet
permissions:
contents: write # Required to update with Gitar Duet changes

steps:
- run: |
echo '${{ toJSON(github.event) }}'
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'

- name: Enable corepack
run: corepack enable

- run: yarn install --immutable
env:
YARN_ENABLE_SCRIPTS: false

- run: |
yarn run biome check --fix --unsafe || true # Run unsafe auto-fixes
yarn lint:fix || true # Fix linting issues
- run: yarn test:updateSnapshot || true # Update test snapshots

- run: |
# Undo deletes for snapshots
git reset
git diff --diff-filter=D --name-only HEAD | xargs git checkout HEAD^ --
- name: Run Gitar Duet Action
uses: gitarcode/gitar-duet-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"test:watch": "yarn test --watch",
"test:coverage": "NODE_ENV=test PORT=4243 jest --coverage --testLocationInResults --outputFile=\"coverage/report.json\" --forceExit --testTimeout=10000",
"test:coverage:jest": "NODE_ENV=test PORT=4243 jest --silent --ci --json --coverage --testLocationInResults --outputFile=\"report.json\" --forceExit --testTimeout=10000",
"test:updateSnapshot": "NODE_ENV=test PORT=4243 jest --updateSnapshot --testTimeout=10000",
"seed:setup": "ts-node --compilerOptions '{\"strictNullChecks\": false}' src/test/e2e/seed/segment.seed.ts",
"seed:serve": "UNLEASH_DATABASE_NAME=unleash_test UNLEASH_DATABASE_SCHEMA=seed yarn run start:dev",
"clean": "del-cli --force dist",
Expand Down Expand Up @@ -247,4 +248,4 @@
]
},
"packageManager": "[email protected]"
}
}

0 comments on commit a691cab

Please sign in to comment.