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