name: "Tests" on: [pull_request] jobs: tests: name: Unit & E2E runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. fetch-depth: 2 # If this run was triggered by a pull request event, then checkout # the head of the pull request instead of the merge commit. - run: git checkout HEAD^2 if: ${{ github.event_name == 'pull_request' }} - name: Prepare Docker run: | export COMPOSE_INTERACTIVE_NO_CLI export DOCKER_BUILDKIT=1 export COMPOSE_DOCKER_CLI_BUILD=1 echo "_APP_FUNCTIONS_RUNTIMES=php-8.0" >> .env docker pull composer:2.0 docker pull php:8.0-cli-alpine docker compose pull - name: Prepare Cache uses: satackey/action-docker-layer-caching@v0.0.11 # Ignore the failure of a step and avoid terminating the job. continue-on-error: true - name: Build Appwrite run: docker compose build --progress=plain - name: Start Appwrite run: | docker compose up -d sleep 30 - name: Doctor run: docker compose exec -T appwrite doctor - name: Environment Variables run: docker compose exec -T appwrite vars - name: Run Tests run: docker compose exec -T appwrite test --debug