diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 00000000..a081eee2 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,41 @@ +name: CI +on: + pull_request: + branches: + - main + +jobs: + check: + runs-on: shell + steps: + - name: Typecheck, lint, and test + run: | + set -e + WORK="$(mktemp -d /var/tmp/epicnext-ci.XXXXXX)" + cleanup() { rm -rf "${WORK}"; } + trap cleanup EXIT + + echo "--- CI checks (${WORK}) ---" + git clone --depth 50 \ + /docker/gitea/gitea/git/repositories/remco/epicnext-cms.git \ + "${WORK}" + cd "${WORK}" + + REF="${{ gitea.sha }}" + if [ -z "${REF}" ]; then + echo "ERROR: missing gitea.sha" >&2 + exit 1 + fi + git fetch --depth 50 origin "${REF}" + git checkout -f "${REF}" + + export SKIP_ENV_VALIDATION=1 + export ARGON2_MEMORY_SIZE=1024 + export ARGON2_ITERATIONS=1 + export BCRYPT_ROUNDS=4 + pnpm install --frozen-lockfile + pnpm prisma:generate + pnpm biome:lint + pnpm typecheck + pnpm test + echo "--- CI checks passed ---" \ No newline at end of file diff --git a/package.json b/package.json index 97d56be0..d3b0cefa 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@hookform/resolvers": "^5.5.7", - "@node-rs/argon2": "^2.0.2", "@prisma/adapter-mariadb": "^7.9.1", "@prisma/client": "^7.9.1", "@sentry/nextjs": "^10.68.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2dfa1364..621cf750 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,9 +35,6 @@ importers: '@hookform/resolvers': specifier: ^5.5.7 version: 5.5.7(@standard-schema/spec@1.1.0)(ajv-formats@2.1.1(ajv@8.20.0))(ajv@8.20.0)(effect@3.20.0)(react-hook-form@7.83.0(react@19.2.8))(valibot@1.4.2(typescript@7.0.2))(zod@4.4.3) - '@node-rs/argon2': - specifier: ^2.0.2 - version: 2.0.2 '@prisma/adapter-mariadb': specifier: ^7.9.1 version: 7.9.1 @@ -508,9 +505,6 @@ packages: '@emnapi/core@1.11.2': resolution: {integrity: sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA==} - '@emnapi/core@1.11.3': - resolution: {integrity: sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==} - '@emnapi/runtime@1.11.1': resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} @@ -523,9 +517,6 @@ packages: '@emnapi/wasi-threads@1.2.2': resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} - '@emnapi/wasi-threads@1.2.3': - resolution: {integrity: sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==} - '@esbuild/aix-ppc64@0.28.1': resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} engines: {node: '>=18'} @@ -1006,9 +997,6 @@ packages: '@lhci/utils@0.15.1': resolution: {integrity: sha512-WclJnUQJeOMY271JSuaOjCv/aA0pgvuHZS29NFNdIeI14id8eiFsjith85EGKYhljgoQhJ2SiW4PsVfFiakNNw==} - '@napi-rs/wasm-runtime@0.2.12': - resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} - '@napi-rs/wasm-runtime@1.2.0': resolution: {integrity: sha512-kDoONqMa+VnZ4vvvu/ZUurpJ4gkZU57e7g69qpNgWhYcZFPUHZM2CEMKm+cG6ufDVALbjMvfmMjFVqaK7uEMnA==} engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} @@ -1078,97 +1066,6 @@ packages: resolution: {integrity: sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==} engines: {node: '>= 20.19.0'} - '@node-rs/argon2-android-arm-eabi@2.0.2': - resolution: {integrity: sha512-DV/H8p/jt40lrao5z5g6nM9dPNPGEHL+aK6Iy/og+dbL503Uj0AHLqj1Hk9aVUSCNnsDdUEKp4TVMi0YakDYKw==} - engines: {node: '>= 10'} - cpu: [arm] - os: [android] - - '@node-rs/argon2-android-arm64@2.0.2': - resolution: {integrity: sha512-1LKwskau+8O1ktKx7TbK7jx1oMOMt4YEXZOdSNIar1TQKxm6isZ0cRXgHLibPHEcNHgYRsJWDE9zvDGBB17QDg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [android] - - '@node-rs/argon2-darwin-arm64@2.0.2': - resolution: {integrity: sha512-3TTNL/7wbcpNju5YcqUrCgXnXUSbD7ogeAKatzBVHsbpjZQbNb1NDxDjqqrWoTt6XL3z9mJUMGwbAk7zQltHtA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@node-rs/argon2-darwin-x64@2.0.2': - resolution: {integrity: sha512-vNPfkLj5Ij5111UTiYuwgxMqE7DRbOS2y58O2DIySzSHbcnu+nipmRKg+P0doRq6eKIJStyBK8dQi5Ic8pFyDw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@node-rs/argon2-freebsd-x64@2.0.2': - resolution: {integrity: sha512-M8vQZk01qojQfCqQU0/O1j1a4zPPrz93zc9fSINY7Q/6RhQRBCYwDw7ltDCZXg5JRGlSaeS8cUXWyhPGar3cGg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - - '@node-rs/argon2-linux-arm-gnueabihf@2.0.2': - resolution: {integrity: sha512-7EmmEPHLzcu0G2GDh30L6G48CH38roFC2dqlQJmtRCxs6no3tTE/pvgBGatTp/o2n2oyOJcfmgndVFcUpwMnww==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - - '@node-rs/argon2-linux-arm64-gnu@2.0.2': - resolution: {integrity: sha512-6lsYh3Ftbk+HAIZ7wNuRF4SZDtxtFTfK+HYFAQQyW7Ig3LHqasqwfUKRXVSV5tJ+xTnxjqgKzvZSUJCAyIfHew==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@node-rs/argon2-linux-arm64-musl@2.0.2': - resolution: {integrity: sha512-p3YqVMNT/4DNR67tIHTYGbedYmXxW9QlFmF39SkXyEbGQwpgSf6pH457/fyXBIYznTU/smnG9EH+C1uzT5j4hA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@node-rs/argon2-linux-x64-gnu@2.0.2': - resolution: {integrity: sha512-ZM3jrHuJ0dKOhvA80gKJqBpBRmTJTFSo2+xVZR+phQcbAKRlDMSZMFDiKbSTnctkfwNFtjgDdh5g1vaEV04AvA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@node-rs/argon2-linux-x64-musl@2.0.2': - resolution: {integrity: sha512-of5uPqk7oCRF/44a89YlWTEfjsftPywyTULwuFDKyD8QtVZoonrJR6ZWvfFE/6jBT68S0okAkAzzMEdBVWdxWw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - libc: [musl] - - '@node-rs/argon2-wasm32-wasi@2.0.2': - resolution: {integrity: sha512-U3PzLYKSQYzTERstgtHLd4ZTkOF9co57zTXT77r0cVUsleGZOrd6ut7rHzeWwoJSiHOVxxa0OhG1JVQeB7lLoQ==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@node-rs/argon2-win32-arm64-msvc@2.0.2': - resolution: {integrity: sha512-Eisd7/NM0m23ijrGr6xI2iMocdOuyl6gO27gfMfya4C5BODbUSP7ljKJ7LrA0teqZMdYHesRDzx36Js++/vhiQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@node-rs/argon2-win32-ia32-msvc@2.0.2': - resolution: {integrity: sha512-GsE2ezwAYwh72f9gIjbGTZOf4HxEksb5M2eCaj+Y5rGYVwAdt7C12Q2e9H5LRYxWcFvLH4m4jiSZpQQ4upnPAQ==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - - '@node-rs/argon2-win32-x64-msvc@2.0.2': - resolution: {integrity: sha512-cJxWXanH4Ew9CfuZ4IAEiafpOBCe97bzoKowHCGk5lG/7kR4WF/eknnBlHW9m8q7t10mKq75kruPLtbSDqgRTw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - - '@node-rs/argon2@2.0.2': - resolution: {integrity: sha512-t64wIsPEtNd4aUPuTAyeL2ubxATCBGmeluaKXEMAFk/8w6AJIVVkeLKMBpgLW6LU2t5cQxT+env/c6jxbtTQBg==} - engines: {node: '>= 10'} - '@opentelemetry/api-logs@0.220.0': resolution: {integrity: sha512-CmVa4ImJ+ynfrPMNaAXHET6Bhb44SwzmfyVJFq9ni2jgXJR/l7C6gfVFddNmHP+ZOkP9cf4f9DBe68qVLTHc9w==} engines: {node: '>=8.0.0'} @@ -5930,12 +5827,6 @@ snapshots: tslib: 2.8.1 optional: true - '@emnapi/core@1.11.3': - dependencies: - '@emnapi/wasi-threads': 1.2.3 - tslib: 2.8.1 - optional: true - '@emnapi/runtime@1.11.1': dependencies: tslib: 2.8.1 @@ -5956,11 +5847,6 @@ snapshots: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.2.3': - dependencies: - tslib: 2.8.1 - optional: true - '@esbuild/aix-ppc64@0.28.1': optional: true @@ -6293,13 +6179,6 @@ snapshots: - supports-color - utf-8-validate - '@napi-rs/wasm-runtime@0.2.12': - dependencies: - '@emnapi/core': 1.11.3 - '@emnapi/runtime': 1.11.3 - '@tybys/wasm-util': 0.10.3 - optional: true - '@napi-rs/wasm-runtime@1.2.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': dependencies: '@emnapi/core': 1.11.1 @@ -6349,67 +6228,6 @@ snapshots: '@noble/hashes@2.2.0': {} - '@node-rs/argon2-android-arm-eabi@2.0.2': - optional: true - - '@node-rs/argon2-android-arm64@2.0.2': - optional: true - - '@node-rs/argon2-darwin-arm64@2.0.2': - optional: true - - '@node-rs/argon2-darwin-x64@2.0.2': - optional: true - - '@node-rs/argon2-freebsd-x64@2.0.2': - optional: true - - '@node-rs/argon2-linux-arm-gnueabihf@2.0.2': - optional: true - - '@node-rs/argon2-linux-arm64-gnu@2.0.2': - optional: true - - '@node-rs/argon2-linux-arm64-musl@2.0.2': - optional: true - - '@node-rs/argon2-linux-x64-gnu@2.0.2': - optional: true - - '@node-rs/argon2-linux-x64-musl@2.0.2': - optional: true - - '@node-rs/argon2-wasm32-wasi@2.0.2': - dependencies: - '@napi-rs/wasm-runtime': 0.2.12 - optional: true - - '@node-rs/argon2-win32-arm64-msvc@2.0.2': - optional: true - - '@node-rs/argon2-win32-ia32-msvc@2.0.2': - optional: true - - '@node-rs/argon2-win32-x64-msvc@2.0.2': - optional: true - - '@node-rs/argon2@2.0.2': - optionalDependencies: - '@node-rs/argon2-android-arm-eabi': 2.0.2 - '@node-rs/argon2-android-arm64': 2.0.2 - '@node-rs/argon2-darwin-arm64': 2.0.2 - '@node-rs/argon2-darwin-x64': 2.0.2 - '@node-rs/argon2-freebsd-x64': 2.0.2 - '@node-rs/argon2-linux-arm-gnueabihf': 2.0.2 - '@node-rs/argon2-linux-arm64-gnu': 2.0.2 - '@node-rs/argon2-linux-arm64-musl': 2.0.2 - '@node-rs/argon2-linux-x64-gnu': 2.0.2 - '@node-rs/argon2-linux-x64-musl': 2.0.2 - '@node-rs/argon2-wasm32-wasi': 2.0.2 - '@node-rs/argon2-win32-arm64-msvc': 2.0.2 - '@node-rs/argon2-win32-ia32-msvc': 2.0.2 - '@node-rs/argon2-win32-x64-msvc': 2.0.2 - '@opentelemetry/api-logs@0.220.0': dependencies: '@opentelemetry/api': 1.9.1