docs: update test scenarios link #16
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: WooCommerce API Automation Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1. Check out repository code | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # 2. Build and start all services | |
| - name: Start all services | |
| run: docker compose up --build -d | |
| # 3. Wait for test-runner to complete | |
| - name: Wait for tests to complete | |
| run: | | |
| echo "Waiting for test-runner to finish..." | |
| docker wait woo-test-runner | |
| # 4. Print test results | |
| - name: Print test logs | |
| if: always() | |
| run: docker logs woo-test-runner | |
| # 5. Copy Allure results from container | |
| - name: Copy Allure report | |
| if: always() | |
| run: | | |
| docker cp woo-test-runner:/app/allure-results ./allure-results || true | |
| docker cp woo-test-runner:/app/allure-report ./allure-report || true | |
| # 6. Upload Allure results as artifact | |
| - name: Upload Allure results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: allure-results | |
| path: allure-results/ | |
| # 7. Upload Allure report as artifact | |
| - name: Upload Allure report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: allure-report | |
| path: allure-report/ | |
| # 8. Deploy Allure report to GitHub Pages | |
| - name: Deploy Allure report to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: allure-report | |
| # 9. Cleanup | |
| - name: Cleanup | |
| if: always() | |
| run: docker compose down -v |