diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index abbbb5c..2dcdc89 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,6 +18,9 @@ jobs: - name: Prepare the CI environment run: npm ci + - name: Build + run: npm run build + - name: Publish run: npm publish env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..c005ef9 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,15 @@ +name: Test Package +on: [push] + +jobs: + tsc: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build Dockerfile + run: docker build -t alumi . + + - name: Run TSC + run: docker run --rm -v $(pwd):/code --workdir /code alumi bash -c 'npm install && npm run build && cd tests && ./tests.sh' diff --git a/DOCS.md b/DOCS.md index d32892f..b6a46bb 100644 --- a/DOCS.md +++ b/DOCS.md @@ -1,4 +1,4 @@ -# Alumi - pulumi-dynamic-provider-aleph +# Alumi - @pocinnovation/alumi - Node Version: v20.11.1 @@ -31,7 +31,7 @@ The format of this variable must be `PROVIDER_NAME:METHOD:VALUE` Post content to aleph ```ts -import { Post } from "pulumi-dynamic-provider-aleph"; +import { Post } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const messageTest = new Post('messageTest', { @@ -61,7 +61,7 @@ export const messageTestExplorer = messageTest.aleph_explorer_url; Store a String as a File to aleph ```ts -import { StoreString } from "pulumi-dynamic-provider-aleph"; +import { StoreString } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const stringStored = StoreString("stringStored", { @@ -87,7 +87,7 @@ export const stringStoredUrl = stringStored.raw_file_url; Store File to aleph ```ts -import { StoreFile } from "pulumi-dynamic-provider-aleph"; +import { StoreFile } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const fileIndexJs = new StoreFile('indexJs', { @@ -112,7 +112,7 @@ export const fileIndexUrl = fileIndexJs.raw_file_url; Store Key-Value pair ```ts -import { Aggregate } from "pulumi-dynamic-provider-aleph"; +import { Aggregate } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const keyValue = new Aggregate('keyValue', { @@ -141,7 +141,7 @@ export const keyValueExplorer = keyValue.aleph_explorer_url; It is wrapper around `Aggregate` ```ts -import { securityKey } from "pulumi-dynamic-provider-aleph"; +import { securityKey } from "@pocinnovation/alumi"; import { ItemType } from "aleph-sdk-ts/dist/messages/types"; export const secuKey = securityKey('key', { diff --git a/package.json b/package.json index a8d7579..e6e7bc1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "pulumi-dynamic-provider-aleph", + "name": "@pocinnovation/alumi", "version": "0.0.1", "description": "Dynamic pulumi provider for Aleph", "main": "dist/index.js", diff --git a/tests/src/index.ts b/tests/src/index.ts index 2824691..31c2e3a 100644 --- a/tests/src/index.ts +++ b/tests/src/index.ts @@ -7,7 +7,7 @@ import { getDefaultRuntime, Instance, getDefaultImage, -} from 'pulumi-dynamic-provider-aleph'; +} from '@pocinnovation/alumi'; import { ItemType } from '@aleph-sdk/message'; import * as pulumi from '@pulumi/pulumi'; import { readFileSync } from 'fs'; diff --git a/tests/tests.sh b/tests/tests.sh new file mode 100755 index 0000000..c844480 --- /dev/null +++ b/tests/tests.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +./init.sh + +npx tsc