Compare commits
1
Commits
main
..
a4e27e3ed2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4e27e3ed2 |
No files matched your search
@@ -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:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -11,11 +10,10 @@ jobs:
|
|||||||
runs-on: pi
|
runs-on: pi
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
||||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version: '24'
|
node-version: '24'
|
||||||
cache: pnpm
|
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
||||||
- run: pnpm install --frozen-lockfile
|
- run: pnpm install --frozen-lockfile
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: pnpm test
|
- 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.
|
* **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.
|
* **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.
|
* **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
|
## Repository Comparison
|
||||||
|
|
||||||
@@ -33,8 +32,3 @@ The Gitea workflow does the following:
|
|||||||
2. Sets up Node.js and pnpm.
|
2. Sets up Node.js and pnpm.
|
||||||
3. Installs the dependencies using `pnpm install`.
|
3. Installs the dependencies using `pnpm install`.
|
||||||
4. Runs the tests using `pnpm test`.
|
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
|
// Mock @actions/core for all tests in this file
|
||||||
vi.mock("@actions/core", () => ({
|
vi.mock("@actions/core", () => ({
|
||||||
|
|||||||
+3
-3
@@ -3,7 +3,7 @@
|
|||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
"description": "Deploys screeps code to the official game or a private server.",
|
"description": "Deploys screeps code to the official game or a private server.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@11.25.0",
|
"packageManager": "pnpm@11.21.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node index.js",
|
"start": "node index.js",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vercel/ncc": "^0.44.1",
|
"@vercel/ncc": "^0.44.1",
|
||||||
"@vitest/coverage-v8": "^4.1.11",
|
"@vitest/coverage-v8": "^4.1.10",
|
||||||
"vitest": "^4.1.11"
|
"vitest": "^4.1.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Generated
+6
-6
@@ -25,10 +25,10 @@ importers:
|
|||||||
specifier: ^0.44.1
|
specifier: ^0.44.1
|
||||||
version: 0.44.1
|
version: 0.44.1
|
||||||
'@vitest/coverage-v8':
|
'@vitest/coverage-v8':
|
||||||
specifier: ^4.1.11
|
specifier: ^4.1.10
|
||||||
version: 4.1.11(vitest@4.1.11)
|
version: 4.1.11(vitest@4.1.11)
|
||||||
vitest:
|
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))
|
version: 4.1.11(@vitest/coverage-v8@4.1.11)(vite@8.2.1(yaml@2.9.0))
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
@@ -330,8 +330,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
|
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
es-module-lexer@2.3.1:
|
es-module-lexer@2.3.2:
|
||||||
resolution: {integrity: sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==}
|
resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==}
|
||||||
|
|
||||||
es-object-atoms@1.1.2:
|
es-object-atoms@1.1.2:
|
||||||
resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==}
|
resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==}
|
||||||
@@ -1040,7 +1040,7 @@ snapshots:
|
|||||||
|
|
||||||
es-errors@1.3.0: {}
|
es-errors@1.3.0: {}
|
||||||
|
|
||||||
es-module-lexer@2.3.1: {}
|
es-module-lexer@2.3.2: {}
|
||||||
|
|
||||||
es-object-atoms@1.1.2:
|
es-object-atoms@1.1.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1369,7 +1369,7 @@ snapshots:
|
|||||||
'@vitest/snapshot': 4.1.11
|
'@vitest/snapshot': 4.1.11
|
||||||
'@vitest/spy': 4.1.11
|
'@vitest/spy': 4.1.11
|
||||||
'@vitest/utils': 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
|
expect-type: 1.4.0
|
||||||
magic-string: 0.30.21
|
magic-string: 0.30.21
|
||||||
obug: 2.1.4
|
obug: 2.1.4
|
||||||
|
|||||||
+15
-6
@@ -5,11 +5,20 @@
|
|||||||
"config:recommended",
|
"config:recommended",
|
||||||
":automergeLinters"
|
":automergeLinters"
|
||||||
],
|
],
|
||||||
"rebaseWhen": "behind-base-branch",
|
"packageRules": [
|
||||||
"branchConcurrentLimit": 2,
|
{
|
||||||
"prConcurrentLimit": 2,
|
"matchManagers": [
|
||||||
"gitIgnoredAuthors": [
|
"pnpm"
|
||||||
"github-actions[bot]@users.noreply.github.com",
|
],
|
||||||
"bot@horstenkamp.eu"
|
"postUpgradeTasks": {
|
||||||
|
"commands": [
|
||||||
|
"pnpm install --frozen-lockfile",
|
||||||
|
"pnpm run build"
|
||||||
|
],
|
||||||
|
"fileFilters": [
|
||||||
|
"dist/index.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user