diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4cf305a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +node_modules +lib +e2e/dist +e2e/.cache +sliver/sliver-client +sliver/sliver-client_* +sliver/sliver-server +sliver/sliver-server_* diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 9bed17c..0dc428c 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -11,6 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: actions/setup-node@v4 with: node-version: 24.x @@ -18,3 +20,25 @@ jobs: - run: npm ci - run: npm run build + + e2e-tests: + name: e2e (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 120 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: actions/setup-node@v4 + with: + node-version: 24.x + cache: npm + - uses: actions/setup-go@v5 + with: + go-version: 1.25.x + - run: npm ci + - run: npm run test:e2e diff --git a/Dockerfile.e2e b/Dockerfile.e2e new file mode 100644 index 0000000..c881f21 --- /dev/null +++ b/Dockerfile.e2e @@ -0,0 +1,27 @@ +FROM node:25-bookworm + +ARG GO_VERSION=1.25.7 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + git \ + make \ + unzip \ + xz-utils \ + && rm -rf /var/lib/apt/lists/* + +RUN curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" \ + | tar -C /usr/local -xzf - + +ENV PATH="/usr/local/go/bin:${PATH}" + +WORKDIR /workspace + +COPY package.json package-lock.json ./ +RUN npm ci + +COPY . . + +CMD ["npm", "run", "test:e2e"] diff --git a/package.json b/package.json index 897f412..16ce952 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sliver-script", - "version": "1.2.5", + "version": "2.0.0", "description": "TypeScript/JavaScript Sliver client library", "main": "lib/index.js", "types": "lib/index.d.ts",