update-frontend #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test E2E Playwright | |
| on: | |
| repository_dispatch: | |
| types: [update-frontend] | |
| jobs: | |
| pruebas-e2e: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1. Download repositories | |
| - name: Download tests | |
| uses: actions/checkout@v4 | |
| with: { path: 'test' } | |
| - name: Download Namastox | |
| uses: actions/checkout@v4 | |
| with: { repository: 'phi-grib/namastox', path: 'backend' } | |
| - name: Download API | |
| uses: actions/checkout@v4 | |
| with: { repository: 'phi-grib/namastox_API', path: 'backend' } | |
| - name: Download Interface | |
| uses: actions/checkout@v4 | |
| with: { repository: 'phi-grib/namastox_web', path: 'frontend' } | |
| # 2. Prepare environment | |
| - uses: actions/setup-node@v4 | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| # 3. Setuo Environments | |
| - name: Setup namastox | |
| working-directory: ./backend/namastox | |
| run: | | |
| conda env create -f environment.yml | |
| eval "$(conda shell.bash hook)" | |
| conda activate namastox | |
| pip install -e . | |
| namastox -c config -a silent | |
| - name: Setup Frontend | |
| working-directory: ./frontend | |
| run: npm install --force | |
| - name: Setup Playwright | |
| working-directory: ./test | |
| run: | | |
| pip install pytest-playwright | |
| playwright install | |
| # 5. Up servers and execute tests | |
| - name: Execute tests | |
| working-directory: ./test | |
| run: | | |
| # Run API | |
| eval "$(conda shell.bash hook)" | |
| conda activate namastox | |
| cd ../backend && python app.py & | |
| npx wait-on http://127.0.0.1:5000 | |
| # Run Interface | |
| cd ../frontend && npm run dev & | |
| npx wait-on http://localhost:4200 | |
| # Ejecutar Playwright | |
| pytest -s |