diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 291ebac..8c7c098 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -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 @@ -174,3 +182,39 @@ 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@v4 + with: + name: cargo-fixture + path: ~/.cargo/bin + - name: Docker Example + working-directory: examples/docker + run: | + ls -l ~/.cargo/bin + cargo fixture diff --git a/Cargo.toml b/Cargo.toml index 0815dcd..2e111a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ "crates/macros", ] exclude = [ - "example", + "examples", ] [workspace.dependencies]