From 5b7c389fc68b4580ff846116e1aaa391f3d15f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Abadesso?= Date: Wed, 19 Jun 2024 13:23:12 -0300 Subject: [PATCH] chore: added CI --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4d170b9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: CI +on: [push] +jobs: + test: + runs-on: ubuntu-latest + services: + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Nix + uses: cachix/install-nix-action@v20 + with: + nix_path: nixpkgs=channel:nixos-unstable + extra_nix_config: | + experimental-features = nix-command flakes + + - name: Cache Nix + uses: DeterminateSystems/magic-nix-cache-action@v2 + + - name: Install dependencies + run: | + nix develop . -c yarn install + + - name: lint + run: | + nix develop . -c yarn workspace hathor-rpc-handler run lint + + - name: tests + run: | + nix develop . -c yarn workspace hathor-rpc-handler run test