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

Merge astar-frame #957

Merged
merged 14 commits into from
Jun 19, 2023
Merged
13 changes: 13 additions & 0 deletions .github/license-check/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
"include": [
"**/*.rs"
],
"exclude": [
"pallets/collator-selection/**",
"pallets/custom-signatures/**",
"precompiles/utils/**",
"vendor/**"
],
"license": "./.github/license-check/headers/HEADER-GNUv3"
},
{
"include": [
"pallets/collator-selection/*.rs",
"pallets/custom-signatures/*.rs"
],
"license": "./.github/license-check/headers/HEADER-APACHE2"
}
]
16 changes: 16 additions & 0 deletions .github/license-check/headers/HEADER-APACHE2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file is part of Astar.

// Copyright (C) 2019-2023 Stake Technologies Pte.Ltd.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
4 changes: 2 additions & 2 deletions .github/scripts/generate-release-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ async function main() {
getRuntimeInfo(argv["srtool-report-folder"], runtimeName)
);

const moduleLinks = ["substrate", "polkadot", "cumulus", "frontier", "astar-frame"].map((repoName) => ({
const moduleLinks = ["substrate", "polkadot", "cumulus", "frontier"].map((repoName) => ({
name: repoName,
link: getCompareLink(repoName, previousTag, newTag),
}));
Expand Down Expand Up @@ -339,7 +339,7 @@ ${moduleLinks.map((modules) => `${capitalize(modules.name)}: ${modules.link}`).j
| \`Ubuntu x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-x86_64.tar.gz) |
| \`Ubuntu aarch64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-aarch64.tar.gz) |

[<img src="https://github.com/AstarNetwork/Astar/blob/master/.github/images/docker.webp" height="200px">](https://hub.docker.com/r/staketechnologies/astar-collator/tags)
[<img src="https://github.com/AstarNetwork/Astar/blob/master/.github/images/docker.webp" height="200px">](https://hub.docker.com/r/staketechnologies/astar-collator/tags)
`

console.log(template);
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/base_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ on:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

compile-and-check:
runs-on: ubuntu-latest
steps:
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Code coverage
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

coverage:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3

- name: Install & display rust toolchain
run: rustup show

- name: Check targets are installed correctly
run: rustup target list --installed

- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Install deps
run: sudo apt -y install protobuf-compiler

- name: Run all tests & Generate report
uses: actions-rs/tarpaulin@v0.1
with:
version: 0.22.0
args: '--workspace -e astar-collator xcm-tools local-runtime shibuya-runtime shiden-runtime astar-runtime integration-tests --exclude-files vendor/* bin/* runtime/* tests/* **/mock.rs **/weights.rs'
out-type: Xml

- name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.2.0
with:
filename: cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '50 80'

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md

- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml
12 changes: 11 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Static Analysis
on: [push, workflow_dispatch]
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

fmt:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
Expand Down Expand Up @@ -64,7 +74,7 @@ jobs:
- name: Checkout the source code
uses: actions/checkout@v3

- name: Check license
- name: Check license
uses: viperproject/check-license-header@v2
with:
path: ./
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ on:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
jobs:
run-tests:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

test-runtimes:
runs-on: ubuntu-latest
steps:
- name: Free disk space
Expand Down
8 changes: 2 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ We welcome any types of contributions that can improve the project/network in an

The Astar Network project uses GitHub as the main source control hosting service. Most forms of communication regarding changes to the code will be done within the issue board of the repository.

The core of Astar Network codebase is split into two repositories:
* [Astar](https://github.com/AstarNetwork/Astar)
* [astar-frame](https://github.com/AstarNetwork/astar-frame)

### Opening an Issue

Contributions within GitHub can take on the following forms:
Expand All @@ -32,7 +28,7 @@ In short:

1. Open an issue regarding a bug fix or feature request (fill in our issue templates)
2. Briefly describe how you plan to make changes to the code
3. Fork the current default branch on _Astar_ or _astar-frame_ or both (depending on where you need to make changes)
3. Fork the current default branch on _Astar_.
4. Open a pull request to the default branch (fill in our pull request template) and add the appropriate label.
5. Ensure all workflow checks have passed
6. Wait for the maintainers approval or change requests
Expand Down Expand Up @@ -75,7 +71,7 @@ The expected flow is:

### Contributor Licenses

By contributing, you agree that your contributions will be licensed under the [GNU General Public License v3.0](https://github.com/AstarNetwork/astar-frame/blob/polkadot-v0.9.19/LICENSE) as is with the Astar source code. If you have any concerns regarding this matter, please contact the maintainer.
By contributing, you agree that your contributions will be licensed under the [GNU General Public License v3.0](https://github.com/AstarNetwork/Astar/blob/master/LICENSE) as is with the Astar source code. If you have any concerns regarding this matter, please contact the maintainer.

## Community Contribution

Expand Down
Loading