Skip to content

Commit

Permalink
Adding GitHub Rust workflow 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranra committed Mar 14, 2024
1 parent 76cec5b commit a7f835f
Showing 1 changed file with 39 additions and 17 deletions.
56 changes: 39 additions & 17 deletions .github/workflows/rspecos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,55 @@ permissions:
contents: read

jobs:
build-and-test:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]
steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
run: rustup show

- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: Compile tests
run: >
cargo test --all-features --no-run
-p pecos-sim
-p pecos-cli
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
run: >
cargo test --all-features
-p pecos-sim
-p pecos-cli
integration-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v4

- name: Set up Rust
run: rustup show

- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: Compile integration tests
run: cargo test --all-features -p polars --test it --no-run

- name: Run integration tests
run: cargo test --all-features -p polars --test it


publish:
needs: build-and-test
needs: [test, integration-test]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
Expand Down

0 comments on commit a7f835f

Please sign in to comment.