Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not encode json request body #6

Merged
merged 4 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ export ERL_AFLAGS="-kernel shell_history enabled"
export LANG=en_US.UTF-8

use flake

# get supabase real keys
source .env
30 changes: 26 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:

strategy:
matrix:
elixir: [1.17.0]
otp: [27.0]
elixir: [1.18.1]
otp: [27.2]

steps:
- name: Checkout code
Expand All @@ -27,8 +27,30 @@ jobs:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Install dependencies
run: mix deps.get
- name: Cache Elixir deps
uses: actions/cache@v1
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Cache Elixir _build
uses: actions/cache@v1
id: build-cache
with:
path: _build
key: ${{ runner.os }}-build-${{ env.MIX_ENV }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Install deps
if: steps.deps-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get --only ${{ env.MIX_ENV }}

- name: Compile deps
if: steps.build-cache.outputs.cache-hit != 'true'
run: mix deps.compile --warnings-as-errors

- name: Clean build
run: mix clean
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/release.yml

This file was deleted.

63 changes: 5 additions & 58 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 33 additions & 36 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
{
description = "Supabase SDK for Elixir";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";

outputs = {nixpkgs, ...}: let
inherit (nixpkgs.lib) genAttrs;
inherit (nixpkgs.lib.systems) flakeExposed;
forAllSystems = f:
genAttrs flakeExposed (system: f (import nixpkgs {inherit system;}));
in {
devShells = forAllSystems (pkgs: let
inherit (pkgs) mkShell;
inherit (pkgs.beam.interpreters) erlang_27;
inherit (pkgs.beam) packagesWith;
beam = packagesWith erlang_27;
elixir_1_18 = beam.elixir.override {
version = "1.18.1";

outputs = {
flake-parts,
systems,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = import systems;
perSystem = {
pkgs,
system,
...
}: let
inherit (pkgs.beam.interpreters) erlang_27;
inherit (pkgs.beam) packagesWith;
beam = packagesWith erlang_27;
in {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
src = pkgs.fetchFromGitHub {
owner = "elixir-lang";
repo = "elixir";
rev = "v1.18.1";
sha256 = "sha256-zJNAoyqSj/KdJ1Cqau90QCJihjwHA+HO7nnD1Ugd768=";
};
devShells.default = with pkgs;
mkShell {
name = "postgrest-ex";
packages = with pkgs;
[beam.elixir_1_17]
++ lib.optional stdenv.isLinux [inotify-tools]
++ lib.optional stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.CoreFoundation
];
};
};
};
in {
default = mkShell {
name = "postgrest-ex";
packages = with pkgs;
[elixir_1_18 postgresql]
++ lib.optional stdenv.isLinux [inotify-tools]
++ lib.optional stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.CoreFoundation
];
};
});
};
}
Loading
Loading