diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bcd5b16 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + container: + image: python:3.12 + + steps: + - uses: actions/checkout@v3 + - name: Install etcd + run: | + wget https://github.com/etcd-io/etcd/releases/download/v3.4.10/etcd-v3.4.10-linux-amd64.tar.gz + tar -xzf etcd-v3.4.10-linux-amd64.tar.gz + mv etcd-v3.4.10-linux-amd64/etcd* /usr/local/bin/ + + - name: Set up Python as Runtime + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Test + run: | + python -m test \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 76f5f4b..7bbace5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,7 +210,7 @@ dependencies = [ [[package]] name = "etcd-client-py" -version = "0.2.3" +version = "0.2.4" dependencies = [ "etcd-client", "pyo3", diff --git a/Makefile b/Makefile index d8496cc..637601f 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,6 @@ fmt: lint: cargo clippy + +test: + python -m test \ No newline at end of file