Merge pull request #158 from BeAPI/issue/80993-new #269
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: Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - develop | |
| # Only run if PHP-related files changed. | |
| paths: | |
| - '.github/workflows/tests.yml' | |
| - '**.php' | |
| - 'codeception.dist.yml' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| # Cancels all previous workflow runs for pull requests that have not completed. | |
| concurrency: | |
| # The concurrency group contains the workflow name and the branch name for pull requests | |
| # or the commit hash for any other events. | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v3 | |
| - name: "Install docker-ce" | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg-agent \ | |
| software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
| $(lsb_release -cs) \ | |
| stable" | |
| sudo apt-get update | |
| sudo apt-get install docker-ce docker-ce-cli containerd.io | |
| - name: "Install Lando" | |
| run: | | |
| curl -fsSL https://get.lando.dev/setup-lando.sh -o setup-lando.sh | |
| chmod +x ./setup-lando.sh | |
| CI=1 ./setup-lando.sh | |
| - name: "Install composer" | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| extensions: mbstring, intl #optional, setup extensions | |
| tools: composer:v2.2 | |
| - name: "Install dev dependencies" | |
| run: | | |
| composer install --no-scripts | |
| - name: "Setup Env" | |
| run: | | |
| lando start | |
| lando setup-env | |
| - name: "Run tests" | |
| run: | | |
| lando tests |