Skip to content

Commit

Permalink
ci/cd, check before push
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Jul 3, 2024
1 parent 2a7f406 commit 39cffe9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_tests_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: build
run: |
cargo build --all --all-features
cargo build --all --all-features --release
cargo build --release --all --all-features
- name: fmt check
run: cargo fmt --all -- --check
Expand All @@ -25,7 +25,7 @@ jobs:
run: cargo check --all

- name: tests
run: cargo test --all --all-features --release -- nocapture
run: cargo test --release --all --all-features -- nocapture

- name: tests
run: cargo publish --dry-run --allow-dirty
4 changes: 2 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: clippy
on:
push:
branches: [ "main" ]
branches: [ main, release ]
pull_request:
branches: [ main ]
branches: [ main, release ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: tests
on:
push:
branches: [ main ]
branches: [ main, release ]
pull_request:
branches: [ main ]
branches: [ main, release ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
7 changes: 5 additions & 2 deletions check-before-push.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
cargo build --all --all-features --release
cargo build --all --all-features
if %errorlevel% neq 0 exit /b %errorlevel%

cargo build --release --all --all-features
if %errorlevel% neq 0 exit /b %errorlevel%

cargo fmt --all -- --check
Expand All @@ -10,7 +13,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
cargo clippy --all
if %errorlevel% neq 0 exit /b %errorlevel%

cargo test --all --all-features --release
cargo test --release --all --all-features
if %errorlevel% neq 0 exit /b %errorlevel%

cargo publish --dry-run --allow-dirty
Expand Down
4 changes: 2 additions & 2 deletions check-before-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -e

cargo build --all --all-features
cargo build --all --all-features --release
cargo build --release --all --all-features
cargo fmt --all -- --check
cargo check --all
cargo clippy --all
cargo test --all --all-features --release
cargo test --release --all --all-features
cargo publish --dry-run --allow-dirty

0 comments on commit 39cffe9

Please sign in to comment.