Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix/test-coverage
Browse files Browse the repository at this point in the history
* origin/master: (102 commits)
  Fix collect_fee (#1754)
  Update HEADER-GPL3
  Update extrinsic-ordering-check-from-bin.yml (#1752)
  Update HEADER-GPL3
  bump version (#1751)
  Remove homa-lite from karura runtime (#1744)
  off-by-one (#1747)
  Revert "simulate exchange rate (#1742)" (#1746)
  simulate exchange rate (#1742)
  bump version (#1743)
  refactor homa (#1648)
  Update stable asset (#1741)
  add more info to events (#1740)
  Fix mandala swap path error (#1736)
  update stable asset (#1738)
  remove unnecessary code (#1735)
  fix currency id testing (#1733)
  rework fee payment (#1687)
  Add Deposit for Setting Alternative Fee Swap Path (#1730)
  Add register_erc20_asset and update_erc20_asset (#1731)
  ...

# Conflicts:
#	.github/workflows/coverage.yml.disabled
#	Cargo.lock
#	Cargo.toml
  • Loading branch information
Roy Yang committed Jan 7, 2022
2 parents 1903486 + b8e0d02 commit ae57f42
Show file tree
Hide file tree
Showing 305 changed files with 35,468 additions and 69,151 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

USER vscode

RUN rustup default nightly-2021-06-17 && \
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-06-17
RUN rustup default nightly-2021-11-07 && \
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-07

RUN rustup component add rustfmt

Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
jobs:
test:
name: Coverage Report
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest #[self-hosted, linux]
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
Expand All @@ -37,7 +37,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
Expand All @@ -51,13 +51,9 @@ jobs:
version: ${{ env.TARPAULIN_VERSION }}
timeout: 900
out-type: Xml
args: '--features with-mandala-runtime --avoid-cfg-tarpaulin --no-fail-fast --all --exclude-files ./runtime/*'
args: '--features with-mandala-runtime --avoid-cfg-tarpaulin --no-fail-fast --exclude-files "./modules/*, ./primitives/*, ./node/*, ./rpc/*, ./ts-tests/*, ./orml/*, ./runtime/*"'
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
verbose: true # optional (default = false)
56 changes: 56 additions & 0 deletions .github/workflows/coverage.yml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Tests Coverage

on:
workflow_dispatch:
pull_request:
branches:
- master
paths-ignore:
- '**/README.md'
push:
branches:
- master
paths-ignore:
- '**/README.md'

env:
TARPAULIN_VERSION: 0.18.2

jobs:
test:
name: Coverage Report
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Clean
run: |
df -h
curl -s https://raw.githubusercontent.com/apache/flink/master/tools/azure-pipelines/free_disk_space.sh | bash
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
- name: Generate code coverage
run: |
wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-${{ env.TARPAULIN_VERSION }}-travis.tar.gz
tar -zxvf cargo-tarpaulin-${{ env.TARPAULIN_VERSION }}-travis.tar.gz -C $HOME/.cargo/bin
# TODO: remove `--avoid-cfg-tarpaulin` after https://github.com/xd009642/tarpaulin/issues/756
cargo tarpaulin --avoid-cfg-tarpaulin --debug --verbose --features with-mandala-runtime --no-fail-fast --workspace --timeout 300 --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
with:
# token: ${{secrets.CODECOV_TOKEN}} # not required for public repos
fail_ci_if_error: true
6 changes: 3 additions & 3 deletions .github/workflows/extrinsic-ordering-check-from-bin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
Expand All @@ -55,7 +55,7 @@ jobs:
echo "-------------------------------------------" >> output.txt
- name: Start local node
run: ./target/release/acala --chain=${{ env.CHAIN }}-dev --rpc-cors=all --ws-external &
run: ./target/release/acala --chain=${{ env.CHAIN }}-dev --rpc-cors=all --ws-external --tmp & pid=$!

- name: Compare the metadata
run: |
Expand All @@ -67,7 +67,7 @@ jobs:
sed -z -i 's/\n\n/\n/g' output.txt
- name: Stop our local node
run: pkill acala
run: kill $pid

- name: Show result
run: cat output.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
subwasm meta $WASM_PATH
subwasm --json meta $WASM_PATH > ${{ env.CHAIN }}-metadata.json
subwasm get wss://karura-rpc-2.aca-api.network/ws --output runtime_mainnet.wasm
subwasm get wss://karura-rpc-2.aca-api.network:443/ws --output runtime_mainnet.wasm
subwasm diff $WASM_PATH runtime_mainnet.wasm | tee ${{ env.CHAIN }}-diff.txt
- name: Generate note
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/srtool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ on:
required: false
# schedule:
# - cron: "00 03 * * 1" # 3AM weekly on mondays
push:
tags:
- "*"
# push:
# tags:
# - "*"

jobs:
build:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
Expand All @@ -88,7 +88,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
Expand All @@ -114,14 +114,14 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 16.x
- name: Run ts tests
run: |
npm install -g yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml.src
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 16.x
- name: Run ts tests
run: |
npm install -g yarn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# This is a basic workflow to help you get started with Actions
name: publish solidity package
name: update tokens

# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
commitMessage:
description: 'commit message'
required: true
default: 'update tokens and publish it'
default: 'update tokens'

jobs:
build:
Expand All @@ -20,22 +17,17 @@ jobs:
with:
submodules: recursive
persist-credentials: false
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-06-17
toolchain: nightly-2021-11-07
components: rustfmt
target: wasm32-unknown-unknown
default: true
- name: publish solidity package
- name: update tokens
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
set -x
echo running on branch ${GITHUB_REF##*/}
Expand All @@ -51,23 +43,9 @@ jobs:
then
echo "nothing to update."
else
git commit -am "${{ github.event.inputs.commitMessage }}"
fi
cd ..
cd predeploy-contracts/contracts
yarn run prepare
yarn version --patch
new_version=$(yarn versions --json | jq -er '.data."@acala-network/contracts"')
git push "https://${{ secrets.GH_PAT }}@github.com/AcalaNetwork/predeploy-contracts.git" HEAD:master
yarn publish --new-version=$new_version --access=public
cd ../..
git commit -am "${{ github.event.inputs.commitMessage }}"
if [ ${GITHUB_REF##*/} -eq "master" ]
then
branch="update-predeploy-contracts-$(date "+%Y%m%d%H%M%y")"
branch="update-tokens-$(date "+%Y%m%d%H%M%y")"
git checkout -b "$branch"
git push -u "https://${{ secrets.GH_PAT }}@github.com/AcalaNetwork/Acala.git" "$branch"
git commit -am "${{ github.event.inputs.commitMessage }}"
git push -u "https://${{ secrets.GH_PAT }}@github.com/AcalaNetwork/predeploy-contracts.git" "$branch"
hub pull-request -m "${{ github.event.inputs.commitMessage }}"
else
git push "https://${{ secrets.GH_PAT }}@github.com/AcalaNetwork/Acala.git" HEAD:${GITHUB_REF##*/}
fi
11 changes: 10 additions & 1 deletion .github/workflows/verify-bootnotes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- cron: "00 04 * * 1" # 4AM weekly on monday

jobs:
build:
verify-karura:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -14,3 +14,12 @@ jobs:
- name: verify bootnotes
run: |
./scripts/verify-bootnodes.sh karura
verify-acala:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: verify bootnotes
run: |
./scripts/verify-bootnodes.sh acala
Loading

0 comments on commit ae57f42

Please sign in to comment.