Skip to content

Commit

Permalink
✅(CI) refecto test-e2e
Browse files Browse the repository at this point in the history
With the new container available, we can simplify
the workflow by removing the build step
and using the container directly.
  • Loading branch information
AntoLC committed Sep 16, 2024
1 parent 33d6f3f commit ca69338
Showing 1 changed file with 5 additions and 50 deletions.
55 changes: 5 additions & 50 deletions .github/workflows/impress-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,6 @@ jobs:
path: "src/frontend/**/node_modules"
key: front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}

build-front:
runs-on: ubuntu-latest
needs: install-front
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Restore the frontend cache
uses: actions/cache@v4
id: front-node_modules
with:
path: "src/frontend/**/node_modules"
key: front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}

- name: Build CI App
run: cd src/frontend/ && yarn ci:build

- name: Cache build frontend
uses: actions/cache@v4
with:
path: src/frontend/apps/impress/out/
key: build-front-${{ github.run_id }}

test-front:
runs-on: ubuntu-latest
needs: install-front
Expand Down Expand Up @@ -98,7 +75,6 @@ jobs:

test-e2e-chromium:
runs-on: ubuntu-latest
needs: build-front
timeout-minutes: 20
steps:
- name: Checkout repository
Expand All @@ -124,13 +100,6 @@ jobs:
path: "src/frontend/**/node_modules"
key: front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}

- name: Restore the build cache
uses: actions/cache@v4
id: cache-build
with:
path: src/frontend/apps/impress/out/
key: build-front-${{ github.run_id }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -139,19 +108,16 @@ jobs:
with:
targets: |
app-dev
y-provider
y-provider
frontend-dev
load: true
set: |
*.cache-from=type=gha,scope=cached-stage
*.cache-to=type=gha,scope=cached-stage,mode=max
- name: Start Docker services
run: |
make run
- name: Start Nginx for the frontend
run: |
docker compose up --force-recreate -d nginx-front
make run-with-frontend
- name: Apply DRF migrations
run: |
Expand All @@ -176,7 +142,6 @@ jobs:

test-e2e-other-browser:
runs-on: ubuntu-latest
needs: build-front
timeout-minutes: 20
steps:
- name: Checkout repository
Expand All @@ -202,13 +167,6 @@ jobs:
path: "src/frontend/**/node_modules"
key: front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}

- name: Restore the build cache
uses: actions/cache@v4
id: cache-build
with:
path: src/frontend/apps/impress/out/
key: build-front-${{ github.run_id }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -218,18 +176,15 @@ jobs:
targets: |
app-dev
y-provider
frontend-dev
load: true
set: |
*.cache-from=type=gha,scope=cached-stage
*.cache-to=type=gha,scope=cached-stage,mode=max
- name: Start Docker services
run: |
make run
- name: Start Nginx for the frontend
run: |
docker compose up --force-recreate -d nginx-front
make run-with-frontend
- name: Apply DRF migrations
run: |
Expand Down

0 comments on commit ca69338

Please sign in to comment.