Compare commits

..

5 Commits

Author SHA1 Message Date
raucao ed9d78315b Merge pull request 'Switch to Node.js 22+' (#232) from dev/node_22 into master
CI / Lint (push) Successful in 49s
CI / Test (push) Successful in 1m29s
Reviewed-on: #232
2026-07-26 12:48:17 +00:00
raucao eb74a5e6d1 Require Node.js 22+
CI / Lint (pull_request) Successful in 55s
CI / Test (pull_request) Successful in 1m59s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
Needs a temporary env var for the tasks, until a larger dependency
update
2026-07-26 14:42:59 +02:00
raucao 9054821e52 Merge pull request 'Guard against contributors failing to load correctly' (#229) from bugfix/missing-contributor-crash into master
CI / Lint (push) Successful in 1m9s
CI / Test (push) Successful in 2m6s
Reviewed-on: #229
2026-07-26 11:24:45 +00:00
raucao 51a9c8ad6f Merge branch 'master' into bugfix/missing-contributor-crash
CI / Lint (pull_request) Successful in 1m6s
CI / Test (pull_request) Successful in 1m58s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
2026-07-25 18:19:16 +00:00
raucao 349f0e5eea Migrate to Gitea Actions (#230)
CI / Lint (push) Successful in 1m10s
CI / Test (push) Successful in 1m57s
CI and Release Drafter

Reviewed-on: #230
2026-07-25 18:18:50 +00:00
8 changed files with 83 additions and 46 deletions
+14
View File
@@ -0,0 +1,14 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
version-resolver:
major:
labels:
- 'release/major'
minor:
labels:
- 'release/minor'
- 'feature'
patch:
labels:
- 'release/patch'
default: patch
+45
View File
@@ -0,0 +1,45 @@
name: CI
on:
push:
branches:
- main
- master
pull_request: {}
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
test:
name: "Test"
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-22.21.0-chrome-141.0.7390.107-1-ff-144.0-edge-141.0.3537.92-1
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npm test
+13
View File
@@ -0,0 +1,13 @@
name: Release Drafter
on:
pull_request:
types: [closed]
jobs:
release_drafter_job:
name: Update release notes draft
runs-on: ubuntu-latest
steps:
- name: Release Drafter
uses: https://github.com/raucao/gitea-release-drafter@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-4
View File
@@ -1,4 +0,0 @@
template: |
## Changes
$CHANGES
-30
View File
@@ -1,30 +0,0 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm test
+1 -1
View File
@@ -1 +1 @@
16 22
+4 -4
View File
@@ -14,7 +14,7 @@ Unhosted Ember.js Web UI for [Kosmos Kredits](https://wiki.kosmos.org/Kredits)
- **ethers 5** + **@kredits/contracts** for on-chain reads/writes - **ethers 5** + **@kredits/contracts** for on-chain reads/writes
- **ember-concurrency** for async sync tasks; **Ember Services** for state (no Redux, no Ember Data) - **ember-concurrency** for async sync tasks; **Ember Services** for state (no Redux, no Ember Data)
- **QUnit** + qunit-dom + fetch-mock for tests - **QUnit** + qunit-dom + fetch-mock for tests
- **Node 16** (`.nvmrc`); `>= 14` in engines - **Node 22** (`.nvmrc`); `>= 22` in engines
## Commands ## Commands
@@ -22,8 +22,7 @@ Unhosted Ember.js Web UI for [Kosmos Kredits](https://wiki.kosmos.org/Kredits)
|---|---| |---|---|
| Dev server (RSK testnet) | `npm start` | | Dev server (RSK testnet) | `npm start` |
| Dev against local Hardhat devchain | `npm run start:local` | | Dev against local Hardhat devchain | `npm run start:local` |
| Full lint + test pipeline (CI) | `npm test` | | Ember/QUnit suite (all tests) | `ember test` |
| Ember/QUnit suite only | `npm run test:ember` |
| Interactive test runner | `ember test --server` | | Interactive test runner | `ember test --server` |
| All linters | `npm run lint` | | All linters | `npm run lint` |
| Lint JS (autofix) | `npm run lint:js -- --fix` | | Lint JS (autofix) | `npm run lint:js -- --fix` |
@@ -91,7 +90,7 @@ Read in `config/environment.js` (lines ~102110). No `.env.example` (`.gitigno
- **Framework**: QUnit via `ember-qunit` + `qunit-dom`; `@ember/test-helpers` (`render`, `click`, `fillIn`). - **Framework**: QUnit via `ember-qunit` + `qunit-dom`; `@ember/test-helpers` (`render`, `click`, `fillIn`).
- **HTTP mocking**: `fetch-mock``tests/test-helper.js` mocks Bitstamp ticker endpoints globally. - **HTTP mocking**: `fetch-mock``tests/test-helper.js` mocks Bitstamp ticker endpoints globally.
- **Runner**: headless Chrome (`testem.js`); CI uses Node 16 via `.github/workflows/ci.yml`. - **Runner**: headless Chrome (`testem.js`); CI uses Node 22 via `.gitea/workflows/ci.yaml`.
- **File patterns**: - **File patterns**:
- `tests/unit/<type>/<name>-test.js` — unit tests for services, controllers, routes, models, helpers, utils. - `tests/unit/<type>/<name>-test.js` — unit tests for services, controllers, routes, models, helpers, utils.
- `tests/integration/components/<name>/component-test.js` — component rendering tests (PODS layout). - `tests/integration/components/<name>/component-test.js` — component rendering tests (PODS layout).
@@ -102,6 +101,7 @@ Read in `config/environment.js` (lines ~102110). No `.env.example` (`.gitigno
## Gotchas ## Gotchas
- **Mid-migration codebase**: classic and Octane component styles coexist. Linters warn (not error) on legacy patterns; `.template-lintrc.js` keeps a `pending` list of templates still using `{{action}}`. - **Mid-migration codebase**: classic and Octane component styles coexist. Linters warn (not error) on legacy patterns; `.template-lintrc.js` keeps a `pending` list of templates still using `{{action}}`.
- **OpenSSL on Node 17+**: `ember-auto-import@1` bundles webpack 4, which hashes with MD4 — dropped by OpenSSL 3 in Node 17+. The `npm` scripts (`start`, `test`, `build`, `build-prod`, `start:local`) prepend `NODE_OPTIONS=--openssl-legacy-provider` to work around this. Direct `npx ember ...` invocations must set the flag manually. Remove once ember-auto-import is upgraded to v2+.
- **`release/` is committed build output** — don't hand-edit; regenerated by `npm run build-prod` (auto-staged on `npm version`). - **`release/` is committed build output** — don't hand-edit; regenerated by `npm run build-prod` (auto-staged on `npm version`).
- **Deployment is `git push 5apps master`** (5apps static hosting) — pushing to `master` triggers a deploy. Be deliberate about commits/pushes. - **Deployment is `git push 5apps master`** (5apps static hosting) — pushing to `master` triggers a deploy. Be deliberate about commits/pushes.
- **No `.env.example`** — set `WEB3_*` vars inline (see `npm run start:local` for the pattern). - **No `.env.example`** — set `WEB3_*` vars inline (see `npm run start:local` for the pattern).
+6 -7
View File
@@ -14,12 +14,11 @@
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*", "lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:hbs": "ember-template-lint .", "lint:hbs": "ember-template-lint .",
"lint:js": "eslint .", "lint:js": "eslint .",
"start": "ember serve", "start": "NODE_OPTIONS=--openssl-legacy-provider ember serve",
"test": "npm-run-all lint:* test:*", "test": "NODE_OPTIONS=--openssl-legacy-provider ember test",
"test:ember": "ember test", "start:local": "WEB3_PROVIDER_URL=http://localhost:8545 WEB3_CHAIN_ID=1337 WEB3_NETWORK_NAME='Hardhat Devchain' NODE_OPTIONS=--openssl-legacy-provider ember serve",
"start:local": "WEB3_PROVIDER_URL=http://localhost:8545 WEB3_CHAIN_ID=1337 WEB3_NETWORK_NAME='Hardhat Devchain' ember serve", "build": "NODE_OPTIONS=--openssl-legacy-provider ember build --environment=production",
"build": "ember build --environment=production", "build-prod": "rm -rf release/* && NODE_OPTIONS=--openssl-legacy-provider ember build -prod --output-path release",
"build-prod": "rm -rf release/* && ember build -prod --output-path release",
"preversion": "npm test", "preversion": "npm test",
"version": "npm run build-prod && git add release/", "version": "npm run build-prod && git add release/",
"deploy": "git push 5apps master" "deploy": "git push 5apps master"
@@ -77,7 +76,7 @@
"web3-utils": "^1.7.3" "web3-utils": "^1.7.3"
}, },
"engines": { "engines": {
"node": ">= 14" "node": ">= 22"
}, },
"ember": { "ember": {
"edition": "octane" "edition": "octane"