mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Mimic production build
This commit is contained in:
parent
7b9f9bbf3c
commit
78718744c5
2 changed files with 9 additions and 10 deletions
4
.github/workflows/test-on-pr.yml
vendored
4
.github/workflows/test-on-pr.yml
vendored
|
|
@ -112,9 +112,7 @@ jobs:
|
||||||
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
|
run: curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh -s -- --ci
|
||||||
|
|
||||||
- name: Install dependencies (root)
|
- name: Install dependencies (root)
|
||||||
run: |
|
run: npm ci
|
||||||
cp npm-shrinkwrap.json packages/safe-chain/
|
|
||||||
npm ci
|
|
||||||
|
|
||||||
- name: Run E2E tests
|
- name: Run E2E tests
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,20 @@ ENV CI=true
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package files first for better caching
|
# Copy package files first for better caching
|
||||||
COPY packages/safe-chain/package.json ./
|
COPY packages/safe-chain/package.json ./packages/safe-chain/package.json
|
||||||
COPY packages/safe-chain/npm-shrinkwrap.json ./
|
COPY ./package.json ./package.json
|
||||||
|
COPY ./npm-shrinkwrap.json ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install
|
RUN npm ci
|
||||||
|
|
||||||
# Copy the rest of the application
|
# Copy the rest of the application
|
||||||
COPY packages/safe-chain ./
|
COPY packages/safe-chain ./
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
RUN npm --no-git-tag-version version 1.0.0 --allow-same-version
|
RUN npm --no-git-tag-version version 1.0.0 --allow-same-version --workspace=packages/safe-chain
|
||||||
RUN npm pack
|
RUN cp ./npm-shrinkwrap.json packages/safe-chain/
|
||||||
|
RUN npm pack --workspace=packages/safe-chain
|
||||||
|
|
||||||
FROM buildpack-deps:trixie
|
FROM buildpack-deps:trixie
|
||||||
|
|
||||||
|
|
@ -80,8 +82,7 @@ RUN apt-get update && apt-get install -y pipx && \
|
||||||
|
|
||||||
# Copy and install Safe chain
|
# Copy and install Safe chain
|
||||||
COPY --from=builder /app/*.tgz /pkgs/
|
COPY --from=builder /app/*.tgz /pkgs/
|
||||||
# RUN npm install -g /pkgs/*.tgz
|
RUN npm install -g /pkgs/*.tgz
|
||||||
RUN npm install -g @aikidosec/safe-chain
|
|
||||||
|
|
||||||
WORKDIR /testapp
|
WORKDIR /testapp
|
||||||
RUN npm init -y
|
RUN npm init -y
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue