diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ba702c9 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Cargo Build & Test + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Rust project - latest + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - stable + - beta + - nightly + crate: + - instruct-macros + - instructor + steps: + - uses: actions/checkout@v4 + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: cd ${{ matrix.crate }} && cargo build --verbose + - run: cd ${{ matrix.crate }} && cargo test --verbose + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} diff --git a/examples/getting-started/Cargo.toml b/docs/examples/getting-started/Cargo.toml similarity index 100% rename from examples/getting-started/Cargo.toml rename to docs/examples/getting-started/Cargo.toml diff --git a/examples/getting-started/src/main.rs b/docs/examples/getting-started/src/main.rs similarity index 100% rename from examples/getting-started/src/main.rs rename to docs/examples/getting-started/src/main.rs