Update wallet and dockerfile to reflect everything being on port 9944… #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
name: Continuous integration | |
jobs: | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run Rustfmt | |
run: cargo fmt --all -- --check | |
toml-sort: | |
name: TOML Sort check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Off-Narrative-Labs/toml_sort@v1 | |
with: | |
all: true | |
test: | |
name: Test and code coverage | |
needs: [fmt, toml-sort] | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install tooling | |
run: | | |
sudo apt-get install -y protobuf-compiler | |
protoc --version | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@nextest | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-targets: true | |
cache-on-failure: true | |
- name: Run tests and print coverage data | |
run: cargo llvm-cov nextest --json --output-path lcov.json | |
--ignore-filename-regex "node/" --summary-only && | |
echo "Lines coverage " && jq ".data[0].totals.lines.percent" lcov.json | |
# if the PR is on the same repo, the coverage data can be reported as a comment | |
- if: github.event_name == 'pull_request' && | |
github.event.pull_request.head.repo.full_name == github.repository | |
name: Generate lcov report | |
run: cargo llvm-cov report --lcov --output-path lcov.info | |
--ignore-filename-regex "node/" | |
- if: github.event_name == 'pull_request' && | |
github.event.pull_request.head.repo.full_name == github.repository | |
name: Report code coverage | |
uses: Nef10/lcov-reporter-action@v0.4.0 | |
with: | |
lcov-file: lcov.info | |
pr-number: ${{ github.event.pull_request.number }} | |
delete-old-comments: true | |
clippy: | |
name: Clippy | |
needs: [fmt, toml-sort] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install tooling | |
run: | | |
sudo apt-get install -y protobuf-compiler | |
protoc --version | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-targets: true | |
cache-on-failure: true | |
- name: Run Clippy | |
run: cargo clippy --no-deps -- -D warnings | |
wallet: | |
name: Wallet end-to-end test | |
needs: [fmt, toml-sort] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install tooling | |
run: | | |
sudo apt-get install -y protobuf-compiler | |
protoc --version | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-targets: true | |
cache-on-failure: true | |
- name: Build | |
run: cargo build | |
- name: Run wallet test | |
run: | | |
./target/debug/node-template --dev & | |
sleep 10 && | |
./target/debug/tuxedo-template-wallet --endpoint http://localhost:9944 |