Add GitHub Actions workflow for E2E testing with Docker #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 of our workflow (will show up in the "Actions" tab) | |
| name: E2E Test Suite | |
| # --- Triggers --- | |
| # This tells GitHub *when* to run this workflow | |
| on: | |
| # Run on every push to the 'main' branch | |
| push: | |
| branches: [ "main" ] | |
| # Also allow running it manually from the Actions tab | |
| workflow_dispatch: | |
| # --- Jobs --- | |
| # A workflow is made of one or more "jobs" | |
| jobs: | |
| build-and-test: | |
| # The type of server to run on (GitHub-hosted) | |
| # 'ubuntu-latest' comes with Docker pre-installed | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Check out our repository code | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| # Step 2: Build and run our Docker containers | |
| # This is the *exact* command we've been using! | |
| - name: Run E2E Tests with Docker Compose | |
| run: docker-compose up --build --abort-on-container-exit | |
| # Step 3: Upload Allure results as an artifact | |
| # This saves the 'allure-results' folder from the server | |
| # so we can download it later. | |
| - name: Upload Allure results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-results | |
| path: allure-results/ |