diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml new file mode 100644 index 0000000..778382c --- /dev/null +++ b/.github/workflows/conformance.yml @@ -0,0 +1,22 @@ +name: Conformances Tests +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@v1 + - uses: Swatinem/rust-cache@v2 + - name: Run tests + run: cargo test + working-directory: conformance diff --git a/README.md b/README.md index 6821b60..a6e22da 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,14 @@ Common tests for all Starknet implementations. +## Conformance tests + +Conformance tests are located in the `conformance` directory. + +They are used to test the conformance of the various Starknet implementations. + +[![Conformance tests](https://github.com/starknet-io/tests/actions/workflows/conformance.yml/badge.svg)](https://github.com/starknet-io/tests/actions/workflows/conformance.yml) + ## License This project is licensed under the [MIT License](LICENSE). diff --git a/conformance/Cargo.toml b/conformance/Cargo.toml new file mode 100644 index 0000000..1e66557 --- /dev/null +++ b/conformance/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "conformance" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/conformance/rust-toolchain.toml b/conformance/rust-toolchain.toml new file mode 100644 index 0000000..a0f1a93 --- /dev/null +++ b/conformance/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "nightly-2024-01-04" diff --git a/conformance/src/main.rs b/conformance/src/main.rs new file mode 100644 index 0000000..a68cf71 --- /dev/null +++ b/conformance/src/main.rs @@ -0,0 +1,11 @@ +fn main() { + println!("Running Starknet conformance tests."); +} + +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +}