Skip to content

Commit

Permalink
Update GitHub workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-kast committed Aug 5, 2022
1 parent dd8442d commit 3951ed4
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 105 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ jobs:
components: cargo, rustc, rustfmt
profile: minimal

- uses: actions-rs/cargo@v1
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
args: --workspace --check

debug-check:
name: cargo check/doc/clippy (debug profile)
Expand All @@ -43,19 +44,27 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}

- uses: actions-rs/cargo@v1
- name: cargo clippy --lib
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --lib --bins --all-features --no-deps --profile=debug-lite
args: --workspace --lib --all-features --no-deps --profile=debug-lite

- name: cargo clippy --bins
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --bins --all-features --no-deps --profile=debug-lite

- name: check lockfile
run: |
diff Cargo.lock <(git show HEAD:Cargo.lock)
- uses: actions-rs/cargo@v1
- name: cargo doc --lib
uses: actions-rs/cargo@v1
with:
command: doc
args: --all --lib --all-features --no-deps --profile=debug-lite
args: --workspace --lib --all-features --no-deps --profile=debug-lite

release-check:
name: cargo check/doc/clippy (release profile)
Expand All @@ -78,12 +87,20 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}

- uses: actions-rs/cargo@v1
- name: cargo clippy --lib --release
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --lib --all-features --profile=release-lite

- name: cargo clippy --bins --release
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --lib --bins --all-features --profile=release-lite
args: --workspace --bins --all-features --profile=release-lite

- uses: actions-rs/cargo@v1
- name: cargo doc --lib --release
uses: actions-rs/cargo@v1
with:
command: doc
args: --all --lib --all-features --no-deps --profile=release-lite
args: --workspace --lib --all-features --no-deps --profile=release-lite
32 changes: 27 additions & 5 deletions .github/workflows/cargo_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Cargo test

on:
pull_request:
branches: [master]
branches: [dev, master]
push:
branches: [dev, master]

Expand All @@ -18,6 +18,10 @@ jobs:
components: cargo, rustc
profile: minimal

- name: set up environment
run: |
docker-compose up -d
- uses: actions/cache@v3
with:
path: |
Expand All @@ -28,10 +32,17 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}

- uses: actions-rs/cargo@v1
- name: cargo test --lib
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --lib --all-features --profile=debug-lite

- name: cargo test --bins
uses: actions-rs/cargo@v1
with:
command: test
args: --all --lib --bins --all-features --profile=debug-lite
args: --workspace --bins --all-features --profile=debug-lite

release-build:
name: cargo build/test (release profile)
Expand All @@ -44,6 +55,10 @@ jobs:
components: cargo, rustc
profile: minimal

- name: set up environment
run: |
docker-compose up -d
- uses: actions/cache@v3
with:
path: |
Expand All @@ -54,7 +69,14 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}

- uses: actions-rs/cargo@v1
- name: cargo test --lib --release
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --lib --all-features --profile=release-lite

- name: cargo test --bins --release
uses: actions-rs/cargo@v1
with:
command: test
args: --all --lib --bins --all-features --profile=release-lite
args: --workspace --bins --all-features --profile=release-lite
50 changes: 0 additions & 50 deletions .github/workflows/deploy_to_heroku_production.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/deploy_to_heroku_staging.yml

This file was deleted.

0 comments on commit 3951ed4

Please sign in to comment.