Skip to content

Commit

Permalink
ci(docker): fix e2e docker image backend deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysKarmazynDFINITY committed Aug 15, 2024
1 parent e7fac40 commit 0d5a4d0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
docker-build-e2e:
runs-on: ubuntu-20.04
steps:
- name: Delete unnecessary tools folder to free space
run: rm -rf /opt/hostedtoolcache

- name: Checkout
uses: actions/checkout@v4

Expand Down
7 changes: 3 additions & 4 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y \
netcat \
ca-certificates \
build-essential \
llvm-dev \
clang \
jq \
&& rm -rf /var/lib/apt/lists/*

# Install NodeJS
Expand All @@ -29,12 +32,8 @@ ENV RUSTUP_HOME=/home/apprunner/.rustup \
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN /bin/bash -c "source /home/apprunner/.cargo/env && rustc --version && cargo --version"

# Install jq
RUN apt-get install jq

# Add wasm32-unknown-unknown target
RUN /bin/bash -c "source /home/apprunner/.cargo/env && rustup target add wasm32-unknown-unknown"

# Install dfx
ENV DFX_PORT=4943
ENV DFX_VERSION=0.20.0
Expand Down
3 changes: 3 additions & 0 deletions docker/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ dfx start --background --quiet

./docker/wait-port "$DFX_PORT"

dfx canister create internet_identity
dfx canister create pouh_issuer

npm run deploy

dfx stop
4 changes: 4 additions & 0 deletions e2e/homepage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ test.describe('logged out user', () => {

testWithII.describe('logged in user', () => {
testWithII.beforeEach(async ({ page, iiPage }) => {
const url = 'http://127.0.0.1:4943';
const canisterId = 'rdmx6-jaaaa-aaaaa-aaadq-cai';
await iiPage.waitReady({ url, canisterId });

await page.goto(testUrl);

await iiPage.signInWithNewIdentity();
Expand Down

0 comments on commit 0d5a4d0

Please sign in to comment.