Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/staking calculator #184

Open
wants to merge 649 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
649 commits
Select commit Hold shift + click to select a range
549a3fc
fix: add current owner in subnet info table
TopETH Mar 28, 2024
b4e1522
update filter for miner incentive
cuteolaf Mar 28, 2024
65ac504
fix: remove query limit in subnet service
TopETH Mar 28, 2024
97f1817
fix: make Metagraph Table 25 items as default
TopETH Mar 28, 2024
5f53317
fix: update useNeuronMetagraph hook
TopETH Mar 28, 2024
f5129db
fix: update useMinerIncentive hook filter
TopETH Mar 28, 2024
1adbde9
fix filter for miner incentive
cuteolaf Mar 28, 2024
5c61bca
fix: replace array.reduce with array.map
TopETH Mar 28, 2024
03c90b6
refactor miner incentive distribution chart
cuteolaf Mar 28, 2024
8a0b390
fix: eslint error
TopETH Mar 28, 2024
d71949b
fix: update individual subnet link in subnets page
TopETH Mar 28, 2024
897a335
fix
cuteolaf Mar 28, 2024
f81ec57
refactor
cuteolaf Mar 28, 2024
e930cac
lint
cuteolaf Mar 28, 2024
9ffdbfc
fix: update subnets and subnet owners fetch endpoint
TopETH Mar 28, 2024
e464b7d
fix: link subnet owner to account page
TopETH Mar 28, 2024
2b0be94
refactor neuron registration chart
cuteolaf Mar 28, 2024
be4a5ea
refactor subnet registration chart
cuteolaf Mar 28, 2024
33ce87c
update filename for chart image
cuteolaf Mar 28, 2024
09aef78
refactor tao recycled 24h
cuteolaf Mar 28, 2024
5972b75
update not found message for subnet owners table.
cuteolaf Mar 28, 2024
bd37b9f
remove unused order key
cuteolaf Mar 28, 2024
5e5972d
refactor coldkey distribution
cuteolaf Mar 28, 2024
cec8894
refactor ip distribution chart
cuteolaf Mar 28, 2024
3a68769
remove unused sort key neuro metagraph table
cuteolaf Mar 28, 2024
fd213ca
update not found message for neuron metagraph table
cuteolaf Mar 28, 2024
544f9c2
update not found message for neuron reg events table
cuteolaf Mar 28, 2024
f06fefd
Merge branch 'master' into finney/subnet-page
TopETH Mar 28, 2024
5e6ca18
fix: delete subnets_names.json
TopETH Mar 28, 2024
a4e90c4
fix: remove unused import
TopETH Mar 28, 2024
76298fc
fix: update subnets table column
TopETH Mar 28, 2024
c57c13a
fix: update subnet links
TopETH Mar 28, 2024
498fd3e
feat: add search in metagraph table
TopETH Mar 28, 2024
f4e15d1
Merge pull request #306 from TaoStats/finney/subnet-page
mogmachine Mar 30, 2024
9ea0b7e
Update subnets.json
mogmachine Mar 31, 2024
89de5cd
Update subnets.json
mogmachine Mar 31, 2024
50cee5d
search by uid
cuteolaf Apr 1, 2024
bad3dda
Merge pull request #318 from TaoStats/search-by-uid
mogmachine Apr 1, 2024
331240e
new column in metagraph table: total $
cuteolaf Apr 1, 2024
ae74aee
Merge pull request #319 from TaoStats/metagraph-total
mogmachine Apr 1, 2024
8eb741c
Update subnets.json
mogmachine Apr 1, 2024
44e7539
fix: uid filter (#320)
cuteolaf Apr 2, 2024
ebc89a5
no decimals in the last row
cuteolaf Apr 2, 2024
0586736
Merge pull request #323 from TaoStats/round-total-recycled
mogmachine Apr 2, 2024
7dffcff
update delegates.json (#325)
cuteolaf Apr 2, 2024
0ffaa73
remove delegates.json (#330)
cuteolaf Apr 2, 2024
41db98e
Fix pagination (#324)
TopETH Apr 3, 2024
7cd38a8
Update index.ts
mogmachine Apr 8, 2024
412cf10
Update subnets.json
mogmachine Apr 8, 2024
17f83a0
update subnets menu (#317)
cuteolaf Apr 8, 2024
6365e23
Update subnets.json
mogmachine Apr 8, 2024
df9ed6d
Hotfix: Subnets link in header (#335)
TopETH Apr 8, 2024
4ed3923
Error handling: Invalid validator addresses (#336)
TopETH Apr 8, 2024
2ef23dd
Update subnets.json
mogmachine Apr 9, 2024
7f27e9f
Update subnets.json
mogmachine Apr 10, 2024
2e6349d
feat: add "Binance" in buy menu
TopETH Apr 11, 2024
102091b
Merge pull request #343 from TaoStats/finney/hotfix-buy-menu
mogmachine Apr 11, 2024
ba99e97
Updates for subnets (#339)
cuteolaf Apr 12, 2024
37c2bca
fix: total staked amount on coldkey page (#346)
cuteolaf Apr 14, 2024
36fe28b
fix: total daily rewards on coldkey page (#347)
cuteolaf Apr 14, 2024
b3f9138
Update subnets.json
mogmachine Apr 15, 2024
3134945
Invalid account address (#348)
TopETH Apr 15, 2024
92cdb5c
Update subnets.json
mogmachine Apr 15, 2024
c68a810
fix: neuron info - updated (#349)
cuteolaf Apr 16, 2024
2847608
fix metagraph table (#350)
cuteolaf Apr 17, 2024
10e384a
rollback subnets
cuteolaf Apr 17, 2024
48a3706
Merge pull request #351 from TaoStats/rollback-subnets
mogmachine Apr 17, 2024
67a6268
Update subnets.json
mogmachine Apr 17, 2024
93f1a78
update column: last_update (#353)
cuteolaf Apr 18, 2024
aa33b0c
Update subnets.json
mogmachine Apr 19, 2024
85d53ba
Refactor: remove unused variables from code (#352)
TopETH Apr 19, 2024
98bd0b2
Update subnets.json
mogmachine Apr 21, 2024
27616ab
fix: restore subnet page and metagraph table
TopETH Apr 22, 2024
7ef0869
Update subnets.json
mogmachine Apr 25, 2024
eaea19b
Update subnets.json
mogmachine Apr 25, 2024
9611479
feat: add "Docs" section in header
TopETH Apr 26, 2024
361409d
feat: show warning for some values in performance boxes
TopETH Apr 26, 2024
1d7c067
Merge pull request #356 from TaoStats/finney/validator
mogmachine Apr 26, 2024
2bd8e8f
Merge pull request #355 from TaoStats/finney/header
mogmachine Apr 26, 2024
50f1ce5
Merge pull request #354 from TaoStats/finney/restore-subnets
mogmachine Apr 26, 2024
bd452c7
Update subnets.json
mogmachine Apr 29, 2024
5b4ac94
Extrinsic page update (#357)
TopETH Apr 29, 2024
10631b0
add github for sn2
cuteolaf Apr 30, 2024
dde80a9
Update index.ts
mogmachine May 1, 2024
e894daf
trim search string on metagraph table
cuteolaf May 2, 2024
97f5a46
Merge pull request #360 from TaoStats/trim-search-string
mogmachine May 2, 2024
b6b67c7
Update subnets.json
mogmachine May 2, 2024
89b64a4
Update subnets.json
mogmachine May 5, 2024
8b873c0
fix: subnet page - recycled lifetime
cuteolaf May 6, 2024
7256d05
show validator take
cuteolaf May 6, 2024
ef6ac04
update label
cuteolaf May 6, 2024
aafcca1
Merge pull request #361 from TaoStats/fix/recycled-lifetime
mogmachine May 6, 2024
411c74a
rename column
cuteolaf May 6, 2024
a3efdc5
Merge branch 'master' into validator-take
cuteolaf May 6, 2024
d81bfd5
Merge pull request #364 from TaoStats/validator-take
mogmachine May 6, 2024
3e262e2
feat: add de-registration chart on subnet page
TopETH May 6, 2024
9a167a7
fix: show 7 days of de-registration chart
TopETH May 6, 2024
e64cf95
fix: show toolbar
TopETH May 6, 2024
23f93bd
fix: show real values for last de-registration emission/incentive
TopETH May 6, 2024
e99c0a4
fix: update type of height in NeuronDeregistration
TopETH May 6, 2024
788d513
fix: remove redundant code
TopETH May 6, 2024
9af7301
fix: use meaningful variable names
TopETH May 6, 2024
e722a66
Update NeuronDeregistrationChart.tsx
cuteolaf May 6, 2024
9cb9534
Merge pull request #365 from TaoStats/feat/subnet-deregistration
mogmachine May 7, 2024
35a6f5d
Improve subquery requests (#359)
TopETH May 7, 2024
cd20268
fix updated (#369)
cuteolaf May 7, 2024
6afd23b
Root subnet page (#368)
TopETH May 7, 2024
f8f7616
Update subnets.json
mogmachine May 9, 2024
09b2c00
Tokenomics page (#370)
TopETH May 9, 2024
5b25a9e
Update subnets.json
mogmachine May 10, 2024
7c1d61f
Update subnets.json
mogmachine May 11, 2024
d44e07c
Update subnets.json
mogmachine May 11, 2024
df8e327
update menu: subnets
cuteolaf May 13, 2024
cba6f95
fix sn0 metagraph table (#371)
cuteolaf May 13, 2024
0664bba
Remove sn0 from subnets table (#372)
TopETH May 13, 2024
2c51477
update sn 33
cuteolaf May 13, 2024
e8541bd
Update subnets.json
mogmachine May 15, 2024
60db1da
fix token issuance
cuteolaf May 15, 2024
3b06701
Update subnets.json
mogmachine May 16, 2024
741d360
add sn34
cuteolaf May 16, 2024
8f8ce8a
Update Header.tsx
cuteolaf May 17, 2024
4aef838
fix coldkey page (#373)
cuteolaf May 17, 2024
ba8e8a8
Revert "fix coldkey page (#373)"
cuteolaf May 17, 2024
49d3121
Fix/coldkey page (#374)
cuteolaf May 17, 2024
2fa802a
remove sn25
cuteolaf May 17, 2024
82d9455
update sn 25 (#375)
TopETH May 20, 2024
837add5
Update ValidatorsStakeHistoryChart (#376)
TopETH May 21, 2024
d0fd490
feat: add norminator return tab in validator page
TopETH May 22, 2024
f53770d
Emergency Banner (#358)
TopETH May 22, 2024
ef3e05b
Update Header.tsx
masterdubs May 23, 2024
0f3c8fd
Update Header.tsx
masterdubs May 23, 2024
b2431f4
Merge pull request #377 from TaoStats/masterdubs-patch-1
mogmachine May 23, 2024
cc8a640
Merge branch 'master' into finney/norminator-return
TopETH May 23, 2024
b0d8b12
fix: show 'validator take' in the chart
TopETH May 23, 2024
d78eaa1
fix: update values of min&max `take`
TopETH May 23, 2024
a612caf
fix: adjust take value
TopETH May 23, 2024
e61f2d0
fix: adjust take value
TopETH May 23, 2024
a81fc7c
fix: calculate max value of total accounts
TopETH May 23, 2024
457ffb4
Merge pull request #379 from TaoStats/finney/accounts-chart
mogmachine May 23, 2024
4e0e50d
Merge branch 'master' into finney/norminator-return
TopETH May 23, 2024
26cdade
fix: update chart labels
TopETH May 23, 2024
b81253a
fix: update tab name
TopETH May 24, 2024
ff80966
fix: build error
TopETH May 24, 2024
97986c7
fix: update chart label
TopETH May 24, 2024
75b4bbf
Merge pull request #378 from TaoStats/finney/norminator-return
mogmachine May 24, 2024
b5244c8
Update subnets.json
mogmachine May 26, 2024
8472eda
Update subnets.json
mogmachine May 27, 2024
a01bb52
Update subnets.json
mogmachine May 28, 2024
e0e3599
feat: add staking return calculator page
TopETH May 28, 2024
27075e2
fix: link for stake button
TopETH May 28, 2024
2efffe8
feat: add weekly and monthly moving average on staking calculator
TopETH May 29, 2024
31e9d48
fix: rename labels
TopETH May 29, 2024
944a5ea
fix: update decimals
TopETH May 29, 2024
ea1ec67
Update staking.tsx
mogmachine May 29, 2024
ab72bc3
fix: eslint error
TopETH May 29, 2024
e111fe9
fix: move taostats validator to top
TopETH May 29, 2024
3775987
feat: add validators table in staking page
TopETH May 29, 2024
136d3ce
fix: show apr for 30 days moving average
TopETH May 29, 2024
6b8cba4
fix: code formatting
TopETH May 29, 2024
f40cc1c
Revert "feat: add validators table in staking page"
TopETH May 29, 2024
798875e
feat: add validators table in staking calculator
TopETH May 29, 2024
77ac126
fix: typo
TopETH May 29, 2024
4adbeac
fix: minor bug
TopETH May 29, 2024
1fd350a
Update subnets.json
mogmachine May 31, 2024
18a2e46
Update subnets.json
mogmachine Jun 1, 2024
7d7acc1
Merge branch 'master' into finney/staking
TopETH Jun 4, 2024
34fc7c2
fix: update staking page
TopETH Jun 4, 2024
3f8728b
fix: use css for hkey/ckey ellipsis
TopETH Jun 4, 2024
1233352
fix: update subnet registration cost chart
TopETH Jun 4, 2024
352cb5a
Merge pull request #381 from TaoStats/fix/metagraph-table
mogmachine Jun 4, 2024
7196e47
Merge pull request #382 from TaoStats/fix/subnet-registration
mogmachine Jun 4, 2024
cd1dfb0
Merge branch 'master' into finney/staking
TopETH Jun 4, 2024
fca39d3
sn6
Jun 4, 2024
0cabf41
Merge pull request #383 from dougsillars/master
mogmachine Jun 4, 2024
7d3c464
Merge branch 'master' into finney/staking
TopETH Jun 5, 2024
5bac8c2
fix: update formula
TopETH Jun 5, 2024
36ef12a
fix: format numbers
TopETH Jun 5, 2024
e97b608
fix: remove weight copiers
TopETH Jun 6, 2024
876000e
fix: broken ui on mobile
TopETH Jun 10, 2024
883e439
feat: add "highlighted" option in ItemsTable
TopETH Jun 10, 2024
610a9c9
feat: add Toggle component
TopETH Jun 10, 2024
5238b0d
fix: update staking page to include weight copiers option
TopETH Jun 10, 2024
2d4fc72
fix: make validators' staking info table sortable
TopETH Jun 10, 2024
d6d03fc
Update subnet menu (#385)
TopETH Jun 10, 2024
06d87ab
placeholders for 37/38 (#384)
dougsillars Jun 10, 2024
34e6346
Update subnets.json
mogmachine Jun 12, 2024
839f9cf
Merge branch 'master' into finney/staking
TopETH Jun 13, 2024
1cc2694
fix: reflect validator's take to apr
TopETH Jun 13, 2024
e1edbfb
Merge branch 'master' into finney/staking
TopETH Jun 13, 2024
3a46391
fix: remove 30d moving average column
TopETH Jun 13, 2024
0992c95
fix: remove space from last column's label of the table
TopETH Jun 13, 2024
bf3d20a
Merge pull request #380 from TaoStats/finney/staking
mogmachine Jun 13, 2024
6df024b
Update subnets.json
mogmachine Jun 13, 2024
da3783c
Update subnets.json
mogmachine Jun 15, 2024
5c1b508
feat: check if account is hotkey
TopETH Jun 17, 2024
44c2bb7
feat: show extrinsic table on hotkey page
TopETH Jun 17, 2024
a68d1e0
fix: remove link to account in hotkey page
TopETH Jun 18, 2024
2571bbb
fix: show address in coldkey page
TopETH Jun 18, 2024
479530a
feat: show extrinsics table in validator page
TopETH Jun 18, 2024
eba4422
Hotfix (#389)
TopETH Jun 18, 2024
975909e
fix: show time in extrinsics table
TopETH Jun 18, 2024
1a35a5f
fix: rename blocks table
TopETH Jun 18, 2024
033f1ce
Merge branch 'master' into finney/hotkey
TopETH Jun 18, 2024
3c2d879
fix: add copy button for address in coldkey page
TopETH Jun 18, 2024
54320d6
fix: build error
TopETH Jun 18, 2024
9ece9c1
fix: update coldkey info section
TopETH Jun 18, 2024
c86fb2a
37 updated (#391)
dougsillars Jun 19, 2024
180250e
Update subnets.json
mogmachine Jun 19, 2024
b747432
Merge pull request #390 from TaoStats/finney/hotkey
mogmachine Jun 19, 2024
c4ad420
Fix responsiveness issues (#392)
TopETH Jun 19, 2024
f08e77a
Update subnets.json
mogmachine Jun 20, 2024
6d4113e
Update subnets.json
mogmachine Jun 20, 2024
19912e2
Update subnets.json
mogmachine Jun 20, 2024
32e0e51
remove wombo form SN30 (#394)
dougsillars Jun 21, 2024
7e97de1
Update subnets.json
mogmachine Jun 22, 2024
ccec244
Update subnets.json
mogmachine Jun 22, 2024
88a2b0e
Update subnets.json
mogmachine Jun 24, 2024
de99e64
fix: 'take' should be affected to 'NOM/24h/kt'
TopETH Jun 24, 2024
5263cca
feat: add description in validators page
TopETH Jun 25, 2024
ff7442d
Update validators.tsx
cuteolaf Jun 26, 2024
3ae356a
Merge pull request #396 from TaoStats/hotfix/validators
mogmachine Jun 26, 2024
c5c0b0e
Update subnets.json
mogmachine Jun 26, 2024
4b590b8
Merge branch 'master' into hotfix/staking-calculator
TopETH Jun 26, 2024
9096aa4
Account validation on hotkey & coldkey page (#393)
TopETH Jun 26, 2024
64be8fd
Merge pull request #395 from TaoStats/hotfix/staking-calculator
mogmachine Jun 26, 2024
a203e45
Update subnets.json
mogmachine Jun 28, 2024
c70a340
Update subnets.json
mogmachine Jul 1, 2024
3427f07
Added link to key checker
bonoliver Jul 4, 2024
761d55a
colour fix
bonoliver Jul 4, 2024
c3eb122
Merge pull request #397 from TaoStats/added-link-to-key-checker
mogmachine Jul 4, 2024
868d59a
Update subnets.json
mogmachine Jul 6, 2024
93c3ef2
update menu: resources (#398)
TopETH Jul 17, 2024
61f54d4
Update subnets.json
mogmachine Jul 17, 2024
d00caf5
Update menu (#399)
cuteolaf Jul 17, 2024
122403c
fix screen overflow when hover on charts (#400)
TopETH Jul 17, 2024
fc06948
Update subnets.json
mogmachine Jul 19, 2024
498670c
Update subnets.json
mogmachine Jul 19, 2024
4143e93
add subnet 41 (#401)
dougsillars Jul 19, 2024
e5e7c21
41 case fix (#402)
dougsillars Jul 19, 2024
1c9ba41
Update subnets.json
mogmachine Jul 21, 2024
a6e6426
Update subnets.json
mogmachine Jul 21, 2024
02be36d
Fix validator page (#404)
cuteolaf Jul 29, 2024
3247ee2
remove old validator
cuteolaf Jul 29, 2024
51e6479
Update subnets.json
mogmachine Aug 1, 2024
5a69e24
remove call to the delegates.json file (#405)
cuteolaf Aug 1, 2024
52e6222
added 40
Aug 4, 2024
6bc3cc8
Merge pull request #406 from dougsillars/master
mogmachine Aug 4, 2024
cbf36ef
Update subnets.json
mogmachine Aug 6, 2024
e4b9ca9
remove requests to delegates.json (#407)
cuteolaf Aug 6, 2024
ff7b470
fix
TopETH Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REACT_APP_INDEXER_ENDPOINT='SUBQUERY_INDEXER_ENDPOINT_FOR_BITTENSOR'
REACT_APP_DICTIONARY_ENDPOINT='SUBQUERY_DICTIONARY_ENDPOINT_FOR_BITTENSOR'
REACT_APP_HISTORICAL_ENDPOINT='SUBQUERY_HISTORICAL_ENDPOINT_FOR_BITTENSOR'
REACT_APP_SUBNETS_ENDPOINT='SUBQUERY_SUBNETS_ENDPOINT_FOR_BITTENSOR'
REACT_APP_TAOSTATS_DATA_ENDPOINT='ENDPOINT_FOR_TAOSTATS_DATA'
70 changes: 37 additions & 33 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,55 @@
module.exports = {
"env": {
"node": true,
"browser": true,
"es2021": true
env: {
node: true,
browser: true,
es2021: true,
},
"extends": [
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended"

"plugin:@typescript-eslint/recommended",
],
"overrides": [
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
overrides: [],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
"plugins": [
"react",
"@typescript-eslint",
"@emotion"
],
"rules": {
"indent": "off",
"@typescript-eslint/indent": ["error", "tab"],
plugins: ["react", "@typescript-eslint", "@emotion"],
rules: {
indent: "off",
"linebreak-style": ["off"],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"react/no-unknown-property": ["error", {
"ignore": ["css"]
}],
quotes: ["error", "double"],
semi: ["error", "always"],
"react/no-unknown-property": [
"error",
{
ignore: ["css"],
},
],
"react/no-unescaped-entities": ["warn"],
"@emotion/jsx-import": ["error", {
"runtime": "automatic"
}],
"@emotion/jsx-import": [
"error",
{
runtime: "automatic",
},
],
"@typescript-eslint/no-empty-interface": ["off"],
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/no-var-requires": ["off"],
"@typescript-eslint/no-unused-vars": ["warn", {
"ignoreRestSiblings": true
}],
"@typescript-eslint/no-unused-vars": [
"warn",
{
ignoreRestSiblings: true,
},
],
"prefer-const": ["warn"],
"no-debugger": ["warn"],
"no-constant-condition": ["warn"],
"@typescript-eslint/ban-ts-comment": ["warn"],
"react/jsx-key": ["off"],
}
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
},
};
4 changes: 2 additions & 2 deletions .github/workflows/add-issues-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
steps:
- name: Get token
id: get-token
uses: topmonks/app-auth-action@v1
uses: TaoStats/app-auth-action@v1
with:
appId: ${{ secrets.PROJECTS_AND_ISSUES_APP_ID }}
appPrivateKey: ${{ secrets.PROJECTS_AND_ISSUES_APP_PRIVATE_KEY }}
- name: Add issue to project
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/topmonks/projects/11
project-url: https://github.com/orgs/TaoStats/projects/1
github-token: ${{ steps.get-token.outputs.token }}
4 changes: 2 additions & 2 deletions .github/workflows/mark-closed-issues-to-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
steps:
- name: Get token
id: get-token
uses: topmonks/app-auth-action@v1
uses: TaoStats/app-auth-action@v1
with:
appId: ${{ secrets.PROJECTS_AND_ISSUES_APP_ID }}
appPrivateKey: ${{ secrets.PROJECTS_AND_ISSUES_APP_PRIVATE_KEY }}
- name: Move issue to column
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ steps.get-token.outputs.token }}
organization: topmonks
organization: TaoStats
project_id: 11
resource_node_id: ${{ github.event.issue.node_id }}
status_value: ${{ github.event.issue.state_reason == 'not_planned' && 'Done' || 'To Release' }}
Expand Down
161 changes: 1 addition & 160 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,169 +18,10 @@ jobs:
REACT_APP_COMMIT_SHA: ${{ github.sha }}
REACT_APP_BUILD_TIMESTAMP: ${{ env.NOW }}
REACT_APP_ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_CLIENT_ACCESS_TOKEN }}
CI: false
run: npm run build
- name: Upload build artifact
uses: actions/upload-artifact@master
with:
name: build
path: build/
test:
name: Test
needs: build
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.30.0-focal
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Download build artifact
uses: actions/download-artifact@master
with:
name: build
path: build
- name: Start app
run: npm run start:test &
- name: Run Playwright Tests
run: npx playwright test
- name: Upload test screenshots artifact
uses: actions/upload-artifact@v3
if: always()
with:
name: test-screenshots
path: test/screenshots
retention-days: 14
- name: Upload test report artifact
uses: actions/upload-artifact@v3
if: always()
with:
name: test-report
path: test/report/
retention-days: 14
test-report:
name: Test report
needs: test
if: always()
environment:
name: test-report
url: ${{ steps.pages.outputs.url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Download test screenshots artifact
uses: actions/download-artifact@master
with:
name: test-screenshots
path: test/screenshots
- name: Download test report artifact
uses: actions/download-artifact@master
with:
name: test-report
path: test/report
- name: Upload Argos screenshots
continue-on-error: true
env:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
run: npx argos upload test/screenshots
- name: Deploy test report to Cloudflare Pages
id: pages
uses: ./.github/actions/deploy-cloudflare-pages
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
project: calamar-test-reports
branch: ${{ github.ref_name }}
path: test/report
preview:
name: Deploy / Preview
needs: test
environment:
name: development
url: ${{ steps.pages.outputs.url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download build artifact
uses: actions/download-artifact@master
with:
name: build
path: build
- name: Current timestamp
uses: ./.github/actions/now
- name: Generate client environment
uses: ./.github/actions/generate-client-env
env:
REACT_APP_PUBLISH_TIMESTAMP: ${{ env.NOW }}
REACT_APP_ROLLBAR_ENV: development
REACT_APP_ROLLBAR_ENABLED: ${{ github.ref_name == 'master' && 'true' || 'false' }}
with:
file: build/env.js
- name: Deploy to Cloudflare Pages
id: pages
uses: ./.github/actions/deploy-cloudflare-pages
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
project: calamar
branch: ${{ github.ref_name }}
path: build
- name: Deploy to Rollbar
if: github.ref_name == 'master'
uses: ./.github/actions/deploy-rollbar
with:
accessToken: ${{ secrets.ROLLBAR_SERVER_ACCESS_TOKEN }}
environment: development
urls: ${{ steps.pages.outputs.url }} ${{ steps.pages.outputs.aliases }}
path: build
deploy:
name: Deploy / Production
needs: test
if: github.ref_name == 'master'
environment:
name: production
url: ${{ steps.pages.outputs.url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download build artifact
uses: actions/download-artifact@master
with:
name: build
path: build
- name: Current timestamp
uses: ./.github/actions/now
- name: Generate client environment
uses: ./.github/actions/generate-client-env
env:
REACT_APP_PUBLISH_TIMESTAMP: ${{ env.NOW }}
REACT_APP_ROLLBAR_ENV: production
REACT_APP_ROLLBAR_ENABLED: true
with:
file: build/env.js
- name: Deploy to Cloudflare Pages
id: pages
uses: ./.github/actions/deploy-cloudflare-pages
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
project: calamar
branch: production
path: build
- name: Deploy to Rollbar
uses: ./.github/actions/deploy-rollbar
with:
accessToken: ${{ secrets.ROLLBAR_SERVER_ACCESS_TOKEN }}
environment: production
urls: ${{ steps.pages.outputs.url }} ${{ steps.pages.outputs.aliases }}
path: build
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/node_modules
/.pnp
.pnp.js

/.vscode
# testing
/coverage

Expand All @@ -17,6 +17,7 @@
.env.development.local
.env.test.local
.env.production.local
.env

npm-debug.log*
yarn-debug.log*
Expand All @@ -27,4 +28,4 @@ yarn-error.log*
/test/results/
/test/report/
/test/screenshots/
/playwright/.cache/
/playwright/.cache/
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.eslint": "explicit"
},
"files.eol": "\n",
"editor.detectIndentation": true,
"editor.inlineSuggest.showToolbar": "onHover",
"prettier.tabWidth": 4
}
Loading