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 e63e9ba commit eac3b9c
Showing 1 changed file with 2 additions and 71 deletions.
73 changes: 2 additions & 71 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,34 +100,12 @@ 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

- name: Build the Docker images
uses: docker/bake-action@v4
with:
targets: |
app-dev
y-provider
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 +130,6 @@ jobs:

test-e2e-other-browser:
runs-on: ubuntu-latest
needs: build-front
timeout-minutes: 20
steps:
- name: Checkout repository
Expand All @@ -202,34 +155,12 @@ 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

- name: Build the Docker images
uses: docker/bake-action@v4
with:
targets: |
app-dev
y-provider
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 eac3b9c

Please sign in to comment.