1
0
Fork 0
mirror of synced 2024-07-08 16:06:02 +12:00
appwrite/.github/workflows/tests.yml

60 lines
1.5 KiB
YAML
Raw Normal View History

name: "Tests"
2022-02-10 08:29:26 +13:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: [pull_request]
jobs:
tests:
name: Unit & E2E
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
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
2022-11-16 12:37:13 +13:00
# Fetch submodules
submodules: recursive
# 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' }}
2023-02-14 08:15:09 +13:00
# This is a separate action that sets up buildx runner
- name: Set up Docker Buildx
2023-02-16 08:27:26 +13:00
uses: docker/setup-buildx-action@v2
2023-02-14 08:15:09 +13:00
2022-02-10 08:29:26 +13:00
- name: Build Appwrite
2023-02-16 08:27:26 +13:00
uses: docker/build-push-action@v3
2023-02-14 08:15:09 +13:00
with:
context: .
push: false
tags: appwrite-dev
load: true
2023-02-14 08:15:09 +13:00
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
DEBUG=false
TESTING=true
VERSION=dev
- name: Start Appwrite
run: |
docker compose up -d
2023-08-18 19:14:13 +12:00
sleep 30
2023-02-14 08:15:09 +13:00
- name: Doctor
2023-08-07 01:55:41 +12:00
run: |
docker compose logs appwrite
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
2023-02-14 10:14:15 +13:00
run: docker compose exec -T appwrite test --debug