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

chore(release): release v0.6.0 #1722

Closed
wants to merge 142 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
d82b2da
feat: cmd: implement import-runtime subcommand (#1483)
noot Mar 23, 2021
dfb95d2
fix(lib/crypto/ed25519): update ed25519 to use go-schnorrkel bip39 de…
noot Mar 24, 2021
4529aee
fix(state) : Update StorageState to load storage from database. (#1486)
arijitAD Mar 24, 2021
3880a40
fix(dot/state): fix usage of trie.Snapshot (#1489)
noot Mar 25, 2021
3b2ad8d
fix(dot/state,dot/network): improve memory usage when syncing (#1491)
noot Mar 25, 2021
22f7269
fix(dot/network): update notificationsProtocol handshakeData to sync.…
noot Mar 25, 2021
a6e0bd0
remove log (#1493)
noot Mar 26, 2021
ae7012b
feat(dot/network): request block justifications when near head (#1499)
noot Apr 5, 2021
f5de11e
chore(cmd): rename genesis-raw flag and files to genesis, allow raw a…
noot Apr 5, 2021
976f53a
refactor: docs: Docs Overhaul (#1438)
RyRy79261 Apr 6, 2021
6e4298e
chore(codeowners): update codeowners file (#1505)
dutterbutter Apr 6, 2021
3c05a88
fix: cmd/gossamer: Generate random name if --name flag not set (#1506)
edwardmack Apr 6, 2021
b7df8ed
chore(release): Automated release using semantic-release. (#1503)
arijitAD Apr 6, 2021
fcb4159
feat: dot/telemetry: Implement basic telemetry connection (#1497)
edwardmack Apr 7, 2021
5089327
fix: fix edit link (#1507)
RyRy79261 Apr 7, 2021
9453957
chore(readme): Fix broken image link (#1509)
dutterbutter Apr 7, 2021
98d1413
fix(dot/network): fix justification request at head logic (#1510)
noot Apr 7, 2021
7850532
feat(dot/network): implement persistent peers functionality (#1512)
noot Apr 8, 2021
271f92e
chore(release): Update name in package.json. (#1514)
arijitAD Apr 9, 2021
accaf69
feat(dot/network): Add cache for network message. (#1511)
arijitAD Apr 13, 2021
558b9b3
chore(release): Fix Deepsource error on development branch. (#1516)
arijitAD Apr 13, 2021
610366b
chore(codeowners): update codeowners file (#1523)
dutterbutter Apr 13, 2021
fdf3c53
fix(dot/network): fix receiving notifications messages from substrate…
noot Apr 14, 2021
0abea00
chore(.github): remove development from release flow (#1526)
dutterbutter Apr 15, 2021
02b53b6
chore(dot/network, lib/grandpa): update network.ConsensusMessage, add…
noot Apr 16, 2021
b18290c
feat: Add properties and chainId on build-spec command (#1520)
EclesioMeloJunior Apr 16, 2021
e1f9f42
feat(dot/network, lib/grandpa): request justification on receiving Ne…
noot Apr 20, 2021
e5ae30d
fix (dot/rpc, dot/state): state_subscribeStorage to only notify for v…
edwardmack Apr 22, 2021
1a3dea2
fix(lib/babe): fix BABE state storing after building block (#1536)
noot Apr 22, 2021
4f8a37b
chore(lib/grandpa): update grandpa message types to match substrate (…
noot Apr 22, 2021
40537f9
chore(linter): change locale to UK from US (#1533)
dutterbutter Apr 24, 2021
1a03b2a
fix(babe): Fix extrinsic format in block. (#1530)
arijitAD Apr 26, 2021
d6152f4
chore:remove codecov token (#1542)
dutterbutter Apr 26, 2021
f23a3a3
chore(dot/core, dot/state, lib/grandpa): implement GrandpaState, use …
noot Apr 27, 2021
ebe6dec
chore(dot/state): create BaseState for accessing non-prefixed db keys…
noot Apr 28, 2021
028d25e
feat(lib/grandpa): fully verify justifications using GrandpaState (#1…
noot Apr 29, 2021
6fd2501
chore(lib/common) implement MustHexToBigInt (#1547)
edwardmack Apr 29, 2021
a632dc4
fix(dot/network): Fix notification handshake and reuse stream. (#1545)
arijitAD Apr 30, 2021
88b88f2
fix: persist node name (#1543)
EclesioMeloJunior Apr 30, 2021
637050b
fix(dot/network): split stored streams and handshakeData into inbound…
noot May 4, 2021
4ebb87f
chore(docs): fix image paths for integrate docs page (#1552)
dutterbutter May 4, 2021
b86c7ff
fix: update go-schnorrkel version (#1557)
kanishkatn May 4, 2021
d7b87f1
chore: close db if node initialized check fails (#1551)
EclesioMeloJunior May 4, 2021
0d6f488
feat(dot/network): add propagate return bool to messageHandler func t…
noot May 5, 2021
e749a8d
feat (dot/telemetry): implement telemetry system.interval message (#1…
edwardmack May 5, 2021
322ccf9
feat(lib/grandpa): send NeighbourMessage to peers (#1558)
noot May 5, 2021
9aa5e9c
chore: merge main into development before release (#1559)
noot May 6, 2021
1eb4e30
Merge branch 'main' of github.com:ChainSafe/gossamer into noot/release
noot May 6, 2021
ab1e9d4
chore: fix merge issues before release
noot May 6, 2021
2b01dcc
chore: fix merge issues before release
noot May 6, 2021
d445c97
fix(release): Trigger release when pushed to main branch. (#1566)
arijitAD May 7, 2021
04a2969
feat: add --chain dev option (#1561)
noot May 10, 2021
1328c80
fix(dot/sync): fix creating block response, fixes node sync between g…
noot May 13, 2021
c1b26d3
fix(lib/babe): add pre-runtime digest before calling initialize_block…
noot May 13, 2021
180962b
fix(polkadot.js) fix -infinity in keys error by adding genesis field …
noot May 13, 2021
eef03c6
chore: add polkadotjs tests to ci (#1567)
dutterbutter May 14, 2021
86acc43
fix(lib/babe): call AddBlock in BABE synchronously (#1585)
noot May 14, 2021
a1cd49a
chore(docs): update README and installation doc to include dev node (…
noot May 17, 2021
c52793a
fix(docs) rename hosts package to dot packages (#1582)
EclesioMeloJunior May 17, 2021
598de4e
chore: improved ci caching for mod and build. Also add codecov id-ci-…
dutterbutter May 17, 2021
24e1516
chore: fix block production path and add article links (#1593)
dutterbutter May 18, 2021
7574f10
feat(rpc/subscription): implement state_unsubscribeStorage (#1574)
edwardmack May 18, 2021
5826322
fix: pending bubble hidden after block included (#1592)
EclesioMeloJunior May 19, 2021
935bc59
fix(dot/network) track sent/received requests by hash (#1575)
EclesioMeloJunior May 19, 2021
af9c925
feat(cmd): implement offline pruning of state trie (#1564)
arijitAD May 20, 2021
f4c79d3
fix(dot/network): fix discovery between gossamer nodes (#1594)
noot May 20, 2021
8c67795
fix(utils): create a specific folder for database (#1598)
EclesioMeloJunior May 21, 2021
5d483f7
chore(review): Add Eclesio to code owners (#1601)
arijitAD May 21, 2021
f18d89e
chore(dot/network): use sync.Pool for network message buffers (#1600)
noot May 21, 2021
be3c325
chore(lib/babe): create BlockBuilder type (#1602)
danigomez May 25, 2021
f195204
fix: update deprecated package (#1603)
EclesioMeloJunior May 25, 2021
58c0854
fix(lib/blocktree): fix setting leaves after blocktree pruning (#1605)
noot May 26, 2021
bc31ac7
fix(dot/telemetry): refactor telemetry to reduce CPU usage (#1597)
edwardmack May 28, 2021
fc8472f
chore(dot/network): improve CPU usage again; no more mallocs (#1608)
noot May 31, 2021
58b8725
fix(dot/core): Fix handle transaction message test. (#1607)
arijitAD Jun 1, 2021
dd3838c
chore(dot/network): Add test for leb128 to uint64 conversion. (#1614)
arijitAD Jun 1, 2021
ba861bf
feat(dot/network): implement streamManager to cleanup not recently us…
noot Jun 2, 2021
87c2f63
fix(dot/network): implement a handshake timeout (#1615)
EclesioMeloJunior Jun 3, 2021
6bf66a4
fix(dot/network): check if peer supports protocol (#1617)
EclesioMeloJunior Jun 4, 2021
29413d4
fix(dot/core): Add only extrinsic during chain reorg. (#1609)
arijitAD Jun 7, 2021
00a8df1
maintainence: fix network tests on CI (#1627)
noot Jun 8, 2021
ca99fbf
fix(dot/state, lib/babe, lib/trie): improve syncing between gossamer …
noot Jun 9, 2021
887f72c
fix(dot/network, lib/grandpa): fix handshake decoding and grandpa mes…
noot Jun 11, 2021
957302f
chore: remove finalnum inherent, clear babe `slotToProof` map (#1632)
noot Jun 11, 2021
d082b9e
fix(dot/network): Check for size when decoding leb128. (#1634)
arijitAD Jun 11, 2021
f5bd761
chore: replace handmade test mocks with auto-generated mocks (#1626)
EclesioMeloJunior Jun 15, 2021
3c18e47
chore(lib/blocktree): cache nodes in map (#1633)
danigomez Jun 15, 2021
57027db
fix(lib/babe): fix timing for transition between epochs (#1636)
noot Jun 15, 2021
d87aaeb
feat(dot/sync): implement codeSubstitutes (#1635)
edwardmack Jun 15, 2021
304d8ac
chore(deps): bump glob-parent in /tests/polkadotjs_test (#1637)
dependabot[bot] Jun 16, 2021
3eb9399
feat(dot/state): implement online pruning of historical state tries (…
arijitAD Jun 17, 2021
c6686f0
chore: updated doc links (#1647)
dutterbutter Jun 17, 2021
1c27575
chore(dot/core, dot/sync, lib/babe): refactor handling on block impor…
noot Jun 17, 2021
204af0e
chore: change tests log level to info (#1644)
EclesioMeloJunior Jun 18, 2021
81f23cc
fix(dot/core): check transaction Validity.Propagate field to determin…
edwardmack Jun 23, 2021
51cfcd7
refactor(lib/scale): refactor lib/scale into own package with idiomat…
timwu20 Jun 23, 2021
23007f0
feat(dot/babe) implement block production time metric (#1648)
EclesioMeloJunior Jun 24, 2021
5c3dbfe
fix(lib/babe): fix setting first slot of network, fix loading BABE ep…
noot Jun 24, 2021
bb281d4
chore: replace time.After with time.NewTicker (#1650)
edwardmack Jun 28, 2021
a81844e
feat(dot/telemetry): implement telemetry message network_state (#1618)
edwardmack Jun 30, 2021
1480c3a
chore: update dev, gssmr to use genesis-spec by default (#1665)
noot Jul 1, 2021
f5a4d3b
feat(lib/transactions) ready transactions metrics (#1656)
EclesioMeloJunior Jul 2, 2021
22827e7
feat(lib/trie): Parallel hash trie. (#1657)
arijitAD Jul 2, 2021
67304e2
chore: update gssmr genesis to v0.9; stub missing ext_ funcs (#1625)
noot Jul 5, 2021
6fbf2fd
refactor(dot/rpc/modules) Add author unit tests, migrate old tests to…
timwu20 Jul 6, 2021
7ecada2
chore (pkg/scale) scale babe integration (#1670)
jimjbrettj Jul 6, 2021
ce9a8a4
feat(lib/grandpa) implement grandpa finality round metrics (#1655)
EclesioMeloJunior Jul 6, 2021
bcc7935
fix(dot/network, lib/grandpa): fix node sync, improve devnet finality
noot Jul 6, 2021
6ecef3b
fix(dot/node): Start websocket server only with `--ws` flag (#1671)
EclesioMeloJunior Jul 6, 2021
d320d1f
fix (dot/telemetry): NoTelemetry flag stops telemetry (#1660)
edwardmack Jul 7, 2021
3350232
refactor(dot/rpc/subscription): refactor websocket `HandleComm` (#1673)
EclesioMeloJunior Jul 7, 2021
d36c3b7
chore(pkg/scale): scale integration into genesis (#1669)
jimjbrettj Jul 7, 2021
e02eca4
fix(dot/network): fix stream manager tests (#1683)
noot Jul 8, 2021
1916f86
chore (pkg/scale) integrate scale into dot/core and dot/sync (#1676)
jimjbrettj Jul 8, 2021
6d38d76
chore (pkg/scale) integrate scale pkg into dot/rpc (#1678)
jimjbrettj Jul 8, 2021
670d418
feat(lib/grandpa) add round state rpc call (#1664)
EclesioMeloJunior Jul 9, 2021
a9b3ccc
chore: replace unbuffered channels with buffered channels (#1668)
edwardmack Jul 9, 2021
cf93ad3
fix(lib/babe): always use 2/3 of slot to produce block, re-add potent…
noot Jul 9, 2021
48405e7
fix(dot/types): fix max value for digest (#1687)
arijitAD Jul 9, 2021
bbdcd6f
fix(dot/state, lib/grandpa): update justification and SignedVote hand…
noot Jul 12, 2021
7f51e4c
feat(dot/rpc) Add `system_localPeerId` rpc call (#1690)
EclesioMeloJunior Jul 13, 2021
bb8021b
chore: added cname for docs (#1692)
dutterbutter Jul 14, 2021
c981d2e
feat(dot/rpc): Add `system_localListenAddresses` RPC call (#1689)
EclesioMeloJunior Jul 15, 2021
093e149
chore(lib/grandpa, dot/network): send `CommitMessage` directly to pee…
noot Jul 16, 2021
a3786e9
feat(dot/rpc) Add `system_syncState` rpc call (#1691)
EclesioMeloJunior Jul 19, 2021
fb0a751
fix: update gssmr genesis to use pallet_babe::SameAuthoritiesForever …
noot Jul 19, 2021
9ce6d44
chore(lib/common) implement byte pool to improve websocket subscripti…
edwardmack Jul 21, 2021
e133884
fix(dot/state): track runtime per-block, fix runtime upgrades differi…
arijitAD Jul 21, 2021
4ee1be6
feat(dot/network) add `network_is_major_syncing` metric (#1697)
EclesioMeloJunior Jul 23, 2021
08516a0
fix(dot/network): decrease DHT find peers interval for gssmr nodes (#…
noot Jul 23, 2021
2e164b4
fix(docs): improve build-spec usage docs (#1706)
EclesioMeloJunior Jul 24, 2021
3c22ace
fix(dot/state): add StorageState Lock/Unlock API for usage by babe an…
noot Jul 26, 2021
e7226ae
add Jimmy to codeowners (#1711)
noot Jul 29, 2021
86df957
feat(dot/rpc) implement `author_hasSessionKeys` RPC call (#1704)
EclesioMeloJunior Aug 3, 2021
65380fd
Revert "feat(dot/rpc) implement `author_hasSessionKeys` RPC call (#17…
EclesioMeloJunior Aug 4, 2021
fc4abf1
feat(dot/rpc) add `grandpa_subscribeJustifications` rpc call (#1672)
EclesioMeloJunior Aug 4, 2021
f73574c
chore(lib/runtime): stub v0.9.8 runtime funcs, partially implement st…
noot Aug 5, 2021
67c93f4
fix(lib/grandpa): fix grandpa stall and various bugs (#1708)
noot Aug 5, 2021
c47a217
feat(dot/rpc) implement `author_hasSessionKeys` RPC call (#1715)
EclesioMeloJunior Aug 6, 2021
d30c7ed
feat(dot/rpc/modules) implement `state_queryStorage` rpc method (#1707)
EclesioMeloJunior Aug 6, 2021
dba5922
feat(dot/rpc/modules): add `system_addReservedPeer` and `system_remov…
EclesioMeloJunior Aug 9, 2021
0932ee8
chore: updated pr template to include primary reviewer (#1724)
dutterbutter Aug 11, 2021
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# Primary repo maintainers
* @noot @arijitAD @edwardmack
* @noot @arijitAD @edwardmack @timwu20 @EclesioMeloJunior @jimjbrettj
10 changes: 5 additions & 5 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
Examples of behaviour that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
Expand All @@ -20,7 +20,7 @@ include:
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:
Examples of unacceptable behaviour by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
Expand All @@ -34,13 +34,13 @@ Examples of unacceptable behavior by participants include:
## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
behaviour and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
permanently any contributor for other behaviours that they deem inappropriate,
threatening, offensive, or harmful.

## Scope
Expand Down
18 changes: 16 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $ git remote -v (you should see myrepo and gossamer in the list of remotes)

To start, check out our open issues. We recommend starting with an [issue labeled `Good First Issue`](https://github.com/ChainSafe/gossamer/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22). Leave a comment to let us know that you would like to work on it.

Another option is to improve gossamer where you see fit based on your evaluation of our code. In order to best faciliate collaboration, please create an issue before you start working on it.
Another option is to improve gossamer where you see fit based on your evaluation of our code. In order to best facilitate collaboration, please create an issue before you start working on it.

**6. Make improvements to the code.**

Expand All @@ -62,6 +62,20 @@ Changes that only affect a single file can be tested with
$ go test <file_you_are_working_on>
```

Sometimes you may need to create mocks for interfaces, in that case you will just execute:

```
$ make mock path=$(path to the interface) interface=$(interface name)
```

The command above will generate a file with prefix `mock_` inside the interface folder, if you want to generate the same mock but inside the `mocks` folder, you can execute:

```
$ make mock path=$(path to the interface) interface=$(interface name) INMOCKS=1
```

The command above will generate the mock inside the folder `$(path)/mocks`, and the mocks will be in the same package that your interface is.

**8. Lint your changes.**

Before opening a pull request be sure to run the linter
Expand All @@ -76,7 +90,7 @@ Navigate your browser to [https://github.com/ChainSafe/gossamer](https://github.

## Note on memory intensive tests
Unfortunately, the free tier for CI's have a memory cap and some tests will cause the CI to experience an out of memory error.
In order to mitigate this we have introduced the concept of **short tests**. If your PR causes an out of memory error please seperate the tests into two groups
In order to mitigate this we have introduced the concept of **short tests**. If your PR causes an out of memory error please separate the tests into two groups
like below and make sure to label it `large`:

```
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ If you're suggesting a change/improvement, tell us how it should work.

<!---

If describing a bug, tell us what happens instead of the expected behavior.
If describing a bug, tell us what happens instead of the expected behaviour.

If suggesting a change or an improvement, explain the difference between your
suggestion and current behavior.
suggestion and current behaviour.

-->

Expand All @@ -55,7 +55,7 @@ submit a PR and you'll get credit for the whole thing.


## To Reproduce
Steps to reproduce the behavior:
Steps to reproduce the behaviour:

1.
2.
Expand Down
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,11 @@ supported format for automatically closing issues (ie, closes #123, fixes #123)
-->

-

## Primary Reviewer

<!--
Please indicate one of the code owners that are required to review prior to merging changes (e.g. @noot)
-->

-
54 changes: 43 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,74 @@ jobs:
platform: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/setup-go@v1
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2

# cache go build cache
- name: Cache go modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-build

# cache go mod cache
- name: Cache go modules
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-mod

- name: Run build
run: make build

publish-code-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v1
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2

# cache go build cache
- name: Cache go modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-build

# cache go mod cache
- name: Cache go modules
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-mod

- name: Install Subkey
run: |
wget -P $HOME/.local/bin/ https://chainbridge.ams3.digitaloceanspaces.com/subkey-v2.0.0
mv $HOME/.local/bin/subkey-v2.0.0 $HOME/.local/bin/subkey
chmod +x $HOME/.local/bin/subkey
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Generate coverage report
run: |
go test ./... -short -coverprofile=coverage.out -covermode=atomic -timeout=20m
- uses: codecov/codecov-action@v1
with:
token: "89982880-a53b-4a3a-9bdd-3dc9c78bd190"
files: ./coverage.out
flags: unit-tests
name: coverage
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
version: 'latest'
args: -v

vet-check:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v1
- uses: actions/setup-go@v2
with:
go-version: '1.15.x'
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Release
on:
push:
branches: [main, development]
branches: [main]

jobs:
release:
Expand All @@ -23,4 +23,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
run: npx semantic-release
101 changes: 86 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,50 @@ jobs:
platform: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/setup-go@v1
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"

- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2

# cache go build cache
- name: Cache go modules
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-build

# cache go mod cache
- name: Cache go modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-mod

- name: Install Subkey
run: |
wget -P $HOME/.local/bin/ https://chainbridge.ams3.digitaloceanspaces.com/subkey-v2.0.0
mv $HOME/.local/bin/subkey-v2.0.0 $HOME/.local/bin/subkey
if [ "$RUNNER_OS" == "Linux" ]; then
wget -P $HOME/.local/bin/ https://chainbridge.ams3.digitaloceanspaces.com/subkey-v2.0.0
mv $HOME/.local/bin/subkey-v2.0.0 $HOME/.local/bin/subkey
elif [ "$RUNNER_OS" == "macOS" ]; then
wget -P $HOME/.local/bin/ https://chainbridge.ams3.digitaloceanspaces.com/subkey-v2.0.0-macos
mv $HOME/.local/bin/subkey-v2.0.0-macos $HOME/.local/bin/subkey
else
echo "Subkey for $RUNNER_OS is not supported"
exit 1
fi

chmod +x $HOME/.local/bin/subkey
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Run unit tests
run: go test -short ./... -timeout=20m
run: go test -short ./... -timeout=30m

- name: Test State - Race
run: make test-state-race
Expand All @@ -42,24 +65,45 @@ jobs:
publish-code-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v1
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2

# cache go build cache
- name: Cache go modules
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-build

# cache go mod cache
- name: Cache go modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-mod

- name: Install Subkey
run: |
wget -P $HOME/.local/bin/ https://chainbridge.ams3.digitaloceanspaces.com/subkey-v2.0.0
mv $HOME/.local/bin/subkey-v2.0.0 $HOME/.local/bin/subkey
chmod +x $HOME/.local/bin/subkey
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Generate coverage report
run: |
go test ./... -short -coverprofile=coverage.out -covermode=atomic -timeout=20m
- uses: codecov/codecov-action@v1
with:
token: "89982880-a53b-4a3a-9bdd-3dc9c78bd190"
if_ci_failed: success
informational: true
files: ./coverage.out
flags: unit-tests
name: coverage
Expand Down Expand Up @@ -88,6 +132,7 @@ jobs:
name: Run stable tests
run: |
docker run chainsafe/gossamer:test sh -c "make it-stable"

docker-rpc-tests:
runs-on: ubuntu-latest
steps:
Expand All @@ -111,6 +156,7 @@ jobs:
name: Run rpc tests
run: |
docker run chainsafe/gossamer:test sh -c "make it-rpc"

docker-stress-tests:
runs-on: ubuntu-latest
steps:
Expand All @@ -134,6 +180,7 @@ jobs:
name: Run stress
run: |
docker run chainsafe/gossamer:test sh -c "make it-stress"

docker-grandpa-tests:
runs-on: ubuntu-latest
steps:
Expand All @@ -154,6 +201,30 @@ jobs:
push: false
tags: chainsafe/gossamer:test
-
name: Run stress
name: Run grandpa
run: |
docker run chainsafe/gossamer:test sh -c "make it-grandpa"

docker-polkadotjs-tests:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
load: true
file: ./Dockerfile
platforms: linux/amd64
push: false
tags: chainsafe/gossamer:test
-
name: Run polkadotjs tests
run: |
docker run chainsafe/gossamer:test sh -c "make it-polkadotjs"
Loading