mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-02-23 10:27:23 -08:00
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com> Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: E2E Tests
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
build-package:
|
|
name: "Build Python package"
|
|
uses: ./.github/workflows/partial-package.yml
|
|
with:
|
|
tag: e2e
|
|
|
|
test:
|
|
timeout-minutes: 60
|
|
needs: build-package
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./tests/e2e
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
cache: 'yarn'
|
|
cache-dependency-path: ./tests/e2e/yarn.lock
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Retrieve Python package
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: backend-dist
|
|
path: dist
|
|
- name: Build Image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
file: ./docker/Dockerfile
|
|
context: .
|
|
build-contexts: |
|
|
packages=dist
|
|
push: false
|
|
load: true
|
|
tags: mealie:e2e
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
- name: Deploy E2E Test Environment
|
|
run: docker compose up -d
|
|
working-directory: ./tests/e2e/docker
|
|
- name: Install dependencies
|
|
run: npm install -g yarn && yarn
|
|
- name: Install Playwright Browsers
|
|
run: yarn playwright install --with-deps
|
|
- name: Check test environment
|
|
run: docker ps
|
|
- name: Run Playwright tests
|
|
run: yarn playwright test
|
|
- name: Destroy Test Environment
|
|
if: always()
|
|
run: docker compose down --volumes
|
|
working-directory: ./tests/e2e/docker
|