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 e4481f5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 64 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@ name: Rust

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

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
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
6 changes: 6 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
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 e4481f5

Please sign in to comment.