Skip to content

Commit

Permalink
ci: test for different features groups
Browse files Browse the repository at this point in the history
  • Loading branch information
meskill committed Jul 3, 2022
1 parent fe92118 commit dadfa9e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Expand Up @@ -42,7 +42,7 @@
// debug
"hediet.debug-visualizer",
// rust
"matklad.rust-analyzer",
"rust-lang.rust-analyzer",
"serayuzgur.crates",
"vadimcn.vscode-lldb",
"bungcip.better-toml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-test.yml
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@v1
with:
sharedKey: build
sharedKey: check
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@v1
with:
sharedKey: build
sharedKey: check
- name: Publish
uses: cycjimmy/semantic-release-action@v3
id: release
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/test.yml
Expand Up @@ -8,11 +8,12 @@ on:
- master

jobs:
build:
check:
strategy:
matrix:
toolchain: [stable]
target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc, i686-pc-windows-gnu, i686-pc-windows-msvc]
target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
features: ['', --features serde, --features async-graphql, --all-features]

runs-on: windows-2022
steps:
Expand All @@ -26,13 +27,13 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@v1
with:
sharedKey: build
- name: build
run: cargo --locked build
sharedKey: check
- name: check
run: cargo --locked check ${{ matrix.features }}

lint:
runs-on: windows-2022
needs: build
needs: check
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -43,15 +44,15 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@v1
with:
sharedKey: build
sharedKey: check
- name: Lint src
run: cargo clippy -- -D warnings
- name: Lint examples
run: cargo clippy --examples -- -D warnings

test:
runs-on: windows-2022
needs: build
needs: check
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -62,6 +63,6 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@v1
with:
sharedKey: build
sharedKey: check
- name: Test
run: cargo test --all-features

0 comments on commit dadfa9e

Please sign in to comment.