Compare commits
5 Commits
c74d70040b
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
ed9d78315b
|
|||
|
eb74a5e6d1
|
|||
|
9054821e52
|
|||
| 51a9c8ad6f | |||
|
349f0e5eea
|
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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 }}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
template: |
|
|
||||||
## Changes
|
|
||||||
|
|
||||||
$CHANGES
|
|
||||||
@@ -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
|
|
||||||
@@ -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 ~102–110). 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 ~102–110). 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
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user