Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
fix: added CI
Browse files Browse the repository at this point in the history
  • Loading branch information
madclaws committed Oct 28, 2023
1 parent 6bffb14 commit 171034c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ex_ucan CI
on:
push:
pull_request:
release:
types: [published]
env:
MIX_ENV: test
jobs:
build_test:
name: Build and test
runs-on: ubuntu-22.04
strategy:
matrix:
elixir: [1.15.7]
otp: [26.0.2]
steps:
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
otp-version: ${{matrix.otp}} # Define the OTP version [required]
experimental-otp: true
- name: Retrieve Mix dependencies Cache
uses: actions/cache@v1
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Install dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Check Formatting
run: mix format --check-formatted
- name: Run Credo
run: mix credo --strict
- name: Run tests
run: |
mix test
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
elixir 1.15.7-otp-26
7 changes: 7 additions & 0 deletions lib/ex_ucan/plugins/ed25519/keypair.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ defmodule ExUcan.Plugins.Ed25519.Keypair do
"""
# TODO: more doc..

# TODO: Need type doc
@type t :: %__MODULE__{
jwt_alg: String.t(),
secret_key: binary(),
Expand All @@ -18,6 +19,7 @@ defmodule ExUcan.Plugins.Ed25519.Keypair do
exportable: false
)


@spec create(boolean()) :: __MODULE__.t()
def create(exportable?) do
{pub, priv} = :crypto.generate_key(:eddsa, :ed25519)
Expand All @@ -29,4 +31,9 @@ defmodule ExUcan.Plugins.Ed25519.Keypair do
)
end

# @spec
def did() do

end

end

0 comments on commit 171034c

Please sign in to comment.