Skip to content

Commit

Permalink
Check sube on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
olanod committed Jun 12, 2024
1 parent 0a73432 commit a53088f
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 78 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/general_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: General checks

on:
push:
branches: [ main ]
env:
CARGO_TERM_COLOR: always

jobs:
sube:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v2
- name: Check sube
run: just check-sube

scales:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v2
- name: Check
run: just check-scales

libwallet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v2
- name: Check
run: just check-libwallet
22 changes: 0 additions & 22 deletions .github/workflows/rust.yml

This file was deleted.

65 changes: 9 additions & 56 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
on: [push, pull_request]
on:
pull_request:
paths: ['sube/**']

name: Continuous integration
name: Sube

jobs:
check:
Expand All @@ -9,57 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --features=std

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- uses: extractions/setup-just@v2
- name: Check
run: just -f sube/justfile check
- name: Check
run: just -f sube/justfile lint
13 changes: 13 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
default: check

check: check-sube

check-sube:
@just -f sube/justfile check lint

check-scales:
@just -f scales/justfile check lint

check-libwallet:
@just -f libwallet/justfile check lint

build-web:
@mkdir -p dist
cargo build --release --target wasm32-unknown-unknown
Expand Down
6 changes: 6 additions & 0 deletions libwallet/justfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
default:
just --choose

check:
cargo check

lint:
cargo clippy -- -D warnings

check-no-std:
cargo build --features substrate --target wasm32-unknown-unknown
cargo build --features substrate --target riscv32i-unknown-none-elf
7 changes: 7 additions & 0 deletions scales/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
default: check

check:
cargo check

lint:
cargo clippy -- -D warnings
7 changes: 7 additions & 0 deletions sube/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
default: check

check:
cargo check

lint:
cargo clippy -- -D warnings

0 comments on commit a53088f

Please sign in to comment.