diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4eb52f4..925e0fe 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,21 +2,16 @@ name: Rust on: push: - branches: [ master ] - pull_request: - branches: [ master ] - + branches: [ main ] env: CARGO_TERM_COLOR: always jobs: - build: - + check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose --all-features + - uses: extractions/setup-just@v2 + - name: Check + run: just check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d6a1cf5..b0473f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,8 @@ -on: [push, pull_request] +on: + pull_request: + paths: ['sube/**'] -name: Continuous integration +name: Sube jobs: check: @@ -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 diff --git a/justfile b/justfile index 8972194..bb4616b 100644 --- a/justfile +++ b/justfile @@ -1,3 +1,9 @@ +default: check + +check: + @echo checking sube ... + @just -f sube/justfile check lint + build-web: @mkdir -p dist cargo build --release --target wasm32-unknown-unknown diff --git a/sube/justfile b/sube/justfile new file mode 100644 index 0000000..1456ed8 --- /dev/null +++ b/sube/justfile @@ -0,0 +1,7 @@ +default: check + +check: + cargo check + +lint: + cargo clippy -- -D warnings