update-frontend #5
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 Flame | |
| uses: actions/checkout@v4 | |
| with: { repository: 'phi-grib/flame', path: 'backend/flame' } | |
| - name: Download Namastox | |
| uses: actions/checkout@v4 | |
| with: { repository: 'phi-grib/namastox', path: 'backend/namastox' } | |
| - name: Download API | |
| uses: actions/checkout@v4 | |
| with: { repository: 'phi-grib/namastox_API', path: 'backend/api' } | |
| - 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 first step namastox | |
| working-directory: ./backend/namastox | |
| run: | | |
| conda env create -f environment.yml | |
| eval "$(conda shell.bash hook)" | |
| conda activate namastox | |
| - name: Setup Flame | |
| working-directory: ./backend/flame | |
| run: pip install -e . | |
| - name: Setup second step namastox | |
| working-directory: ./backend/namastox | |
| run: | | |
| pip install -e . | |
| namastox -c config -a silent | |
| flame -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/api && 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 | |
| # Execute Playwright tests | |
| cd ../test pytest -s |