diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 03b35020..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,42 +0,0 @@ -on: [push, pull_request] - -name: build - -jobs: - build: - name: build (${{ matrix.toolchain }}) - runs-on: ubuntu-latest - strategy: - matrix: - toolchain: [stable, nightly] - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install toolchain - id: toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.toolchain }} - target: wasm32-unknown-unknown - override: true - - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Update Dependencies - uses: actions-rs/cargo@v1 - with: - command: update - - - name: Cache dependencies - env: - rustc-hash: ${{ steps.toolchain.outputs.rustc_hash }} - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ env.rustc-hash }}-${{ hashFiles('**/Cargo.lock') }} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..5c6c4157 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,25 @@ +on: [push, pull_request] + +name: check + +jobs: + stable: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - run: cargo fmt --all -- --check + - run: cargo clippy --all-features -- -D warnings + - run: cargo test --all-features + nightly: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + with: + components: clippy, rustfmt + - run: cargo fmt --all -- --check + - run: cargo clippy --all-features -- -D warnings + - run: cargo test --all-features diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 943713b6..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,74 +0,0 @@ -on: [push, pull_request] - -name: lint - -jobs: - fmt: - name: fmt (${{ matrix.rust }}) - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - - nightly - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - components: rustfmt - override: true - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - continue-on-error: false - with: - command: fmt - args: --all -- --check - - clippy: - name: clippy (${{ matrix.rust }}) - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - - nightly - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - components: clippy - override: true - - - name: Update Dependencies - uses: actions-rs/cargo@v1 - with: - command: update - - - name: Cache dependencies - env: - rustc-hash: ${{ steps.toolchain.outputs.rustc_hash }} - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ env.rustc-hash }}-${{ hashFiles('**/Cargo.lock') }} - - - name: Run cargo clippy - uses: actions-rs/clippy-check@v1 - continue-on-error: false - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features -- -D warnings diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index fbfa82fa..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,89 +0,0 @@ -on: [push, pull_request] - -name: test - -jobs: - check: - name: check (${{ matrix.rust }}) - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - - nightly - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install toolchain - id: toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - - - name: Update Dependencies - uses: actions-rs/cargo@v1 - with: - command: update - - - name: Cache dependencies - env: - rustc-hash: ${{ steps.toolchain.outputs.rustc_hash }} - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ env.rustc-hash }}-${{ hashFiles('**/Cargo.lock') }} - - - name: Run cargo check - uses: actions-rs/cargo@v1 - continue-on-error: false - with: - command: check - - test: - name: test (${{ matrix.rust }}) - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - stable - - nightly - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install toolchain - id: toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - - - name: Update Dependencies - uses: actions-rs/cargo@v1 - with: - command: update - - - name: Cache dependencies - env: - rustc-hash: ${{ steps.toolchain.outputs.rustc_hash }} - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ env.rustc-hash }}-${{ hashFiles('**/Cargo.lock') }} - - - name: Run cargo test - uses: actions-rs/cargo@v1 - continue-on-error: false - with: - command: test - args: --all-features