Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4e27e3ed2 |
@@ -0,0 +1,18 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pre-commit-lint:
|
||||
name: pre-commit Linting
|
||||
runs-on: pi
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
||||
- run: pip install pre-commit
|
||||
shell: bash
|
||||
- name: Pre Commit
|
||||
run: SKIP=no-commit-to-branch pre-commit run -a
|
||||
shell: bash
|
||||
@@ -1,55 +0,0 @@
|
||||
name: Recompile dist/ on Renovate PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
- package.json
|
||||
- pnpm-lock.yaml
|
||||
- index.js
|
||||
- monitor.js
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
recompile:
|
||||
runs-on: pi
|
||||
if: |
|
||||
(github.actor == 'renovate[bot]' || contains(github.head_ref, 'renovate/')) &&
|
||||
!contains(github.event.head_commit.message, '[skip compile]')
|
||||
steps:
|
||||
- name: Checkout PR Branch
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
ref: ${{ github.head_ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
||||
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: pnpm
|
||||
|
||||
- name: Clean Install
|
||||
run: pnpm install --frozen-lockfile --ignore-scripts
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
shell: bash
|
||||
|
||||
- name: Commit dist/
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add dist/
|
||||
if git diff --staged --quiet; then
|
||||
echo "No changes to dist/"
|
||||
else
|
||||
git commit -m "chore: compile action bundle [skip compile]"
|
||||
git push origin HEAD:${{ github.head_ref }}
|
||||
fi
|
||||
shell: bash
|
||||
@@ -2,7 +2,6 @@ name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -11,11 +10,10 @@ jobs:
|
||||
runs-on: pi
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
node-version: '24'
|
||||
cache: pnpm
|
||||
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
||||
- run: pnpm install --frozen-lockfile
|
||||
shell: bash
|
||||
- run: pnpm test
|
||||
|
||||
@@ -7,7 +7,6 @@ This repository is maintained by Gemini.
|
||||
* **Test-Driven Development (TDD):** Wherever possible, Test-Driven Development principles should be followed. Write tests before writing the code they are intended to validate.
|
||||
* **Pre-commit Hooks:** Ensure that `pre-commit` hooks are installed and active before making any commits. This can be done by running `pre-commit install` in your local repository.
|
||||
* **Note for Gemini:** Git commits trigger pre-commit hooks, which can take several seconds (or minutes) to complete. Checking the command status for git commit is only appropriate every 120s.
|
||||
* **Package Manager Preferences:** Always use `pnpm` and `pnpx`. Never use `npm` or `npx` under any circumstances. All package management operations, script runs, and tool invocations must use `pnpm` / `pnpx`.
|
||||
|
||||
## Repository Comparison
|
||||
|
||||
@@ -33,8 +32,3 @@ The Gitea workflow does the following:
|
||||
2. Sets up Node.js and pnpm.
|
||||
3. Installs the dependencies using `pnpm install`.
|
||||
4. Runs the tests using `pnpm test`.
|
||||
|
||||
### Automated Recompilation & Permissions
|
||||
|
||||
* The automated recompilation workflow (`.gitea/workflows/recompile-dist.yaml`) recompiles `dist/index.js` on Renovate PRs and requires `contents: write` permissions to push back to the branch.
|
||||
* Ensure that the Gitea repository workflow settings have write permissions enabled (**Settings** ➔ **Actions** ➔ **General** ➔ **Workflow permissions** ➔ **Read and write permissions**).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { vi, describe, it, expect, beforeEach, afterEach } from "vitest";
|
||||
import { vi, describe, it, expect, beforeEach } from "vitest";
|
||||
|
||||
// Mock @actions/core for all tests in this file
|
||||
vi.mock("@actions/core", () => ({
|
||||
|
||||
Vendored
+8
-8
File diff suppressed because one or more lines are too long
+4
-4
@@ -3,7 +3,7 @@
|
||||
"version": "0.2.1",
|
||||
"description": "Deploys screeps code to the official game or a private server.",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@11.25.0",
|
||||
"packageManager": "pnpm@11.21.0",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "node index.js",
|
||||
@@ -17,8 +17,8 @@
|
||||
"screeps-api": "^1.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vercel/ncc": "^0.45.0",
|
||||
"@vitest/coverage-v8": "^4.1.11",
|
||||
"vitest": "^4.1.11"
|
||||
"@vercel/ncc": "^0.44.1",
|
||||
"@vitest/coverage-v8": "^4.1.10",
|
||||
"vitest": "^4.1.10"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+11
-11
@@ -22,13 +22,13 @@ importers:
|
||||
version: 1.16.1(supports-color@7.2.0)
|
||||
devDependencies:
|
||||
'@vercel/ncc':
|
||||
specifier: ^0.45.0
|
||||
version: 0.45.0
|
||||
specifier: ^0.44.1
|
||||
version: 0.44.1
|
||||
'@vitest/coverage-v8':
|
||||
specifier: ^4.1.11
|
||||
specifier: ^4.1.10
|
||||
version: 4.1.11(vitest@4.1.11)
|
||||
vitest:
|
||||
specifier: ^4.1.11
|
||||
specifier: ^4.1.10
|
||||
version: 4.1.11(@vitest/coverage-v8@4.1.11)(vite@8.2.1(yaml@2.9.0))
|
||||
|
||||
packages:
|
||||
@@ -203,8 +203,8 @@ packages:
|
||||
'@types/estree@1.0.9':
|
||||
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
|
||||
|
||||
'@vercel/ncc@0.45.0':
|
||||
resolution: {integrity: sha512-8zPi1yO2mHpoKTD+e+Bf0ZT3e+sWHSOyGapm9s7b5R0gxJi3CiFTqmeQiMEyu6ejrz2s09M8JkEoUaTWjBJPQQ==}
|
||||
'@vercel/ncc@0.44.1':
|
||||
resolution: {integrity: sha512-cUjIE5P2YY1n+Kt9rFIazMMpGoPn1Fic04rOmTkElMkiDP5oszGfERMpo2shVkFKDL7rVppdM2pqJKC59shQWQ==}
|
||||
hasBin: true
|
||||
|
||||
'@vitest/coverage-v8@4.1.11':
|
||||
@@ -330,8 +330,8 @@ packages:
|
||||
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
es-module-lexer@2.3.1:
|
||||
resolution: {integrity: sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==}
|
||||
es-module-lexer@2.3.2:
|
||||
resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==}
|
||||
|
||||
es-object-atoms@1.1.2:
|
||||
resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==}
|
||||
@@ -906,7 +906,7 @@ snapshots:
|
||||
|
||||
'@types/estree@1.0.9': {}
|
||||
|
||||
'@vercel/ncc@0.45.0': {}
|
||||
'@vercel/ncc@0.44.1': {}
|
||||
|
||||
'@vitest/coverage-v8@4.1.11(vitest@4.1.11)':
|
||||
dependencies:
|
||||
@@ -1040,7 +1040,7 @@ snapshots:
|
||||
|
||||
es-errors@1.3.0: {}
|
||||
|
||||
es-module-lexer@2.3.1: {}
|
||||
es-module-lexer@2.3.2: {}
|
||||
|
||||
es-object-atoms@1.1.2:
|
||||
dependencies:
|
||||
@@ -1369,7 +1369,7 @@ snapshots:
|
||||
'@vitest/snapshot': 4.1.11
|
||||
'@vitest/spy': 4.1.11
|
||||
'@vitest/utils': 4.1.11
|
||||
es-module-lexer: 2.3.1
|
||||
es-module-lexer: 2.3.2
|
||||
expect-type: 1.4.0
|
||||
magic-string: 0.30.21
|
||||
obug: 2.1.4
|
||||
|
||||
+15
-6
@@ -5,11 +5,20 @@
|
||||
"config:recommended",
|
||||
":automergeLinters"
|
||||
],
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"branchConcurrentLimit": 2,
|
||||
"prConcurrentLimit": 2,
|
||||
"gitIgnoredAuthors": [
|
||||
"github-actions[bot]@users.noreply.github.com",
|
||||
"bot@horstenkamp.eu"
|
||||
"packageRules": [
|
||||
{
|
||||
"matchManagers": [
|
||||
"pnpm"
|
||||
],
|
||||
"postUpgradeTasks": {
|
||||
"commands": [
|
||||
"pnpm install --frozen-lockfile",
|
||||
"pnpm run build"
|
||||
],
|
||||
"fileFilters": [
|
||||
"dist/index.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user