1
0
Fork 0
mirror of synced 2024-07-03 13:41:01 +12:00
appwrite/.github/workflows/tests.yml

46 lines
1.3 KiB
YAML
Raw Normal View History

name: "Tests"
2022-02-10 08:29:26 +13:00
on: [pull_request]
jobs:
tests:
name: Unit & E2E
2022-02-10 08:29:26 +13:00
runs-on: self-hosted
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' }}
2022-02-10 08:29:26 +13:00
- name: Build Appwrite
# Upstream bug causes buildkit pulls to fail so prefetch base images
# https://github.com/moby/moby/issues/41864
run: |
echo "_APP_FUNCTIONS_RUNTIMES=php-8.0" >> .env
docker pull composer:2.0
docker pull php:8.0-cli-alpine
2022-02-10 08:29:26 +13:00
docker compose build --progress=plain
2021-10-23 04:32:25 +13:00
docker compose up -d
2022-02-10 08:29:26 +13:00
sleep 10
- name: Doctor
2021-10-23 04:32:25 +13:00
run: docker compose exec -T appwrite doctor
- name: Environment Variables
2021-10-23 04:32:25 +13:00
run: docker compose exec -T appwrite vars
- name: Run Tests
2021-10-23 05:30:42 +13:00
run: docker compose exec -T appwrite test --debug
2022-02-10 08:29:26 +13:00
- name: Teardown
if: always()
run: |
2022-02-28 09:33:27 +13:00
docker ps -aq | xargs docker rm --force
docker volume prune --force
docker network prune --force