diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f14384262..ed7fd4836 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,32 +15,21 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - uses: abelfodil/protoc-action@v1 + - name: Install nix + uses: cachix/install-nix-action@v15 with: - protoc-version: '21.5' + extra_nix_config: | + access-tokens = github=${{ github.token }} - # Taken from: https://github.com/actions/cache/blob/main/examples.md#rust---cargo - - uses: actions/cache@v3 + - name: configure cachix + uses: cachix/cachix-action@v10 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - - name: Configure toolchain - uses: dtolnay/rust-toolchain@stable - - - name: Unit tests - run: cargo test - - - name: Clippy - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features -- -D warnings + name: glaredb + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + + - name: run checks + run: nix flake check + # TODO: Add this under nix flake check? - name: SQL Logic Tests - run: cargo run --bin slt_runner -- testdata/sqllogictests/*.slt + run: nix develop -c cargo run --bin slt_runner -- testdata/sqllogictests/*.slt diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 29677007e..193507af2 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -28,6 +28,12 @@ jobs: extra_nix_config: | access-tokens = github=${{ github.token }} + - name: configure cachix + uses: cachix/cachix-action@v10 + with: + name: glaredb + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Authenticate to Google Cloud uses: google-github-actions/auth@v0 with: diff --git a/flake-parts/devshell/default.nix b/flake-parts/devshell/default.nix index 65fb675f2..bd4c69e3f 100644 --- a/flake-parts/devshell/default.nix +++ b/flake-parts/devshell/default.nix @@ -20,7 +20,6 @@ cocogitto protobuf gdb - miniserve ]; otherNativeBuildInputs = with pkgs; [pkgconfig openssl openssl.dev llvmPackages.bintools];