From c038c4b47cd2ee3639c782a5627eaff6cd945c08 Mon Sep 17 00:00:00 2001 From: youben11 Date: Wed, 11 Oct 2023 11:41:02 +0100 Subject: [PATCH] ci(tests): run tests on PR/Push events --- .github/workflows/tests.yaml | 34 ++++++++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..b426a7e --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,34 @@ +name: Run Tests + +on: + push: + branches: + - 'main' + tags: + - '*' + pull_request: + +jobs: + build_and_test: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Checkout zbc-fhe-tool + uses: actions/checkout@v3 + with: + repository: zama-ai/fhevm-tfhe-cli + ref: main + path: zbc-fhe-tool + + - name: Generate TFHE-rs keys + working-directory: ./zbc-fhe-tool + run: | + mkdir -p $HOME/.evmosd/zama/keys/network-fhe-keys + cargo run --features tfhe/x86_64-unix --release -- generate-keys -d $HOME/.evmosd/zama/keys/network-fhe-keys + + - name: Run tests + run: make test diff --git a/Makefile b/Makefile index 2a47ff5..3a4e097 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ build: build-tfhe-rs-capi cd fhevm && CGO_CFLAGS=${CGO_CFLAGS} CGO_LDFLAGS=${CGO_LDFLAGS} go build . .PHONY: test -test: +test: build-tfhe-rs-capi cd fhevm && CGO_CFLAGS=${CGO_CFLAGS} CGO_LDFLAGS=${CGO_LDFLAGS} go test -v . .PHONY: build-tfhe-rs-capi