Fix workflow to use the workspace

This commit is contained in:
Valentin Tolmer 2021-06-23 11:13:18 +02:00
parent 0a761ff11f
commit f12abb35d3

View File

@ -10,31 +10,17 @@ env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
test_server: test:
name: cargo test server name: cargo test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Build - name: Build
run: cargo build --verbose run: cargo build --verbose --workspace
- name: Run tests - name: Run tests
run: cargo test --verbose run: cargo test --verbose --workspace
test_client:
name: cargo test client
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
working-directory: ./app
- name: Run tests
run: cargo test --verbose
working-directory: ./app
clippy: clippy:
name: cargo clippy name: cargo clippy
@ -51,26 +37,11 @@ jobs:
override: true override: true
components: rustfmt, clippy components: rustfmt, clippy
- name: Run cargo clippy on server - name: Run cargo clippy
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: clippy command: clippy
args: --tests -- -D warnings args: --tests --all -- -D warnings
- name: Run cargo clippy on client
working-directory: ./app
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
- name: Run cargo clippy on model
working-directory: ./model
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
format: format:
name: cargo fmt name: cargo fmt
@ -87,21 +58,7 @@ jobs:
override: true override: true
components: rustfmt, clippy components: rustfmt, clippy
- name: Run cargo fmt on server - name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo fmt on client
working-directory: ./app
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo fmt on model
working-directory: ./model
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: fmt command: fmt