Skip to content

Commit

Permalink
WIP CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechkral committed Jan 22, 2024
1 parent d9c8308 commit f2ae851
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,16 @@ jobs:
~/.cargo/registry/cache
target
key: test-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
- name: Build
run: cargo build --locked
- name: Test
run: cargo test --locked -- --nocapture
- name: Upload linux binary
uses: actions/upload-artifact@v3
with:
name: cargo-fixture
path: target/debug/cargo-fixture
if-no-files-found: error

test-windows:
name: Test on Windows
Expand Down Expand Up @@ -174,3 +182,41 @@ jobs:
with:
command: check
args: --locked

examples-linux:
name: Run examples on Linux
needs: test-linux
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
examples/docker/target
examples/http/target
key: examples-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
- name: Get cargo-fixture
uses: actions/download-artifact@v3
with:
name: cargo-fixture
path: cargo-fixture
# - uses: actions/download-artifact@v3
# with:
# name: cargo-fixture
# path: cargo-fixture
- name: Docker Example
# working-directory: examples/docker
run: ls -l
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ members = [
"crates/macros",
]
exclude = [
"example",
"examples",
]

[workspace.dependencies]
Expand Down

0 comments on commit f2ae851

Please sign in to comment.