mirror of
https://github.com/logos-storage/logos-storage-js.git
synced 2026-01-05 23:13:07 +00:00
feat: add CI (#20)
* Add CI * Rename CI * Remove only modifier * Define specific node version
This commit is contained in:
parent
df64af08e5
commit
a8970d2377
29
.github/workflows/ci.yaml
vendored
Normal file
29
.github/workflows/ci.yaml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
node_version: 22.12.0
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.node_version }}
|
||||||
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
|
- run: npm ci
|
||||||
|
|
||||||
|
- run: npm test
|
||||||
@ -6,6 +6,11 @@ The SDK has a small bundle size and support tree shaking.
|
|||||||
|
|
||||||
The SDK is currently under early development and the API can change at any time.
|
The SDK is currently under early development and the API can change at any time.
|
||||||
|
|
||||||
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
|
[](https://opensource.org/licenses/MIT)
|
||||||
|
[](#stability)
|
||||||
|
[](https://github.com/codex-storage/codex-js/actions/workflows/ci.yml?query=branch%3Amaster)
|
||||||
|
|
||||||
## Breaking changes
|
## Breaking changes
|
||||||
|
|
||||||
- Version 0.1.0 introduces [upload strategy](#upload) to support browser and Node JS.
|
- Version 0.1.0 introduces [upload strategy](#upload) to support browser and Node JS.
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { afterEach, assert, describe, it, vi } from "vitest";
|
|||||||
import { Fetch } from "../fetch-safe/fetch-safe";
|
import { Fetch } from "../fetch-safe/fetch-safe";
|
||||||
import { CodexError } from "../errors/errors";
|
import { CodexError } from "../errors/errors";
|
||||||
|
|
||||||
describe.only("fetch", () => {
|
describe("fetch", () => {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
vi.restoreAllMocks();
|
vi.restoreAllMocks();
|
||||||
});
|
});
|
||||||
@ -26,7 +26,7 @@ describe.only("fetch", () => {
|
|||||||
assert.deepStrictEqual(result, { error: true, data: error });
|
assert.deepStrictEqual(result, { error: true, data: error });
|
||||||
});
|
});
|
||||||
|
|
||||||
it.only("returns an error when the json parsing failed", async () => {
|
it("returns an error when the json parsing failed", async () => {
|
||||||
const mockResponse = {
|
const mockResponse = {
|
||||||
ok: true,
|
ok: true,
|
||||||
status: 200,
|
status: 200,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user