mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
feat: test upload artifact
This commit is contained in:
parent
addc88ccdc
commit
2eae37d802
1 changed files with 62 additions and 31 deletions
93
.github/workflows/tests.yml
vendored
93
.github/workflows/tests.yml
vendored
|
|
@ -4,10 +4,13 @@ concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
TAG: appwrite-dev
|
||||||
|
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
setup:
|
||||||
name: Build & Unit Test
|
name: Setup & Build Appwrite Image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -25,58 +28,86 @@ jobs:
|
||||||
- run: git checkout HEAD^2
|
- run: git checkout HEAD^2
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
# This is a separate action that sets up buildx runner
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Build Appwrite
|
- name: Build Appwrite
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: false
|
push: false
|
||||||
tags: appwrite-dev
|
tags: $TAG
|
||||||
load: true
|
load: true
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
outputs: type=docker,dest=/tmp/$TAG.tar
|
||||||
build-args: |
|
build-args: |
|
||||||
DEBUG=false
|
DEBUG=false
|
||||||
TESTING=true
|
TESTING=true
|
||||||
VERSION=dev
|
VERSION=dev
|
||||||
|
|
||||||
- name: Start Appwrite
|
- name: Upload Docker Image
|
||||||
run: |
|
uses: actions/upload-artifact@v3
|
||||||
docker compose up -d
|
with:
|
||||||
sleep 30
|
name: $TAG
|
||||||
|
path: /tmp/$TAG.tar
|
||||||
|
|
||||||
- name: Doctor
|
|
||||||
run: docker compose exec -T appwrite doctor
|
|
||||||
|
|
||||||
- name: Environment Variables
|
# - name: Start Appwrite
|
||||||
run: docker compose exec -T appwrite vars
|
# run: |
|
||||||
|
# docker compose up -d
|
||||||
|
# sleep 30
|
||||||
|
|
||||||
- name: Run Unit Tests
|
# - name: Doctor
|
||||||
run: docker compose exec appwrite test /usr/src/code/tests/unit
|
# run: docker compose exec -T appwrite doctor
|
||||||
|
|
||||||
e2e_test:
|
# - name: Environment Variables
|
||||||
name: E2E Test
|
# run: docker compose exec -T appwrite vars
|
||||||
|
|
||||||
|
# - name: Run Unit Tests
|
||||||
|
# run: docker compose exec appwrite test /usr/src/code/tests/unit
|
||||||
|
|
||||||
|
unit_test:
|
||||||
|
name: Unit Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: setup
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
services: [Account,Avatars,Console,Databases,Functions,GraphQL,Health,Locale,Projects,Realtime,Storage,Teams,Users,Webhooks]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 1
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Start Appwrite
|
- name: Download artifact
|
||||||
run: |
|
uses: actions/download-artifact@v3
|
||||||
docker compose up -d
|
with:
|
||||||
sleep 30
|
name: $TAG
|
||||||
|
path: /tmp
|
||||||
|
|
||||||
- name: Run ${{matrix.services}} Tests
|
- name: Load Docker image
|
||||||
run: docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.services}} --debug
|
run: |
|
||||||
|
docker load --input /tmp/$TAG.tar
|
||||||
|
docker image ls -a
|
||||||
|
|
||||||
|
|
||||||
|
# e2e_test:
|
||||||
|
# name: E2E Test
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs: build
|
||||||
|
# strategy:
|
||||||
|
# fail-fast: false
|
||||||
|
# matrix:
|
||||||
|
# services: [Account,Avatars,Console,Databases,Functions,GraphQL,Health,Locale,Projects,Realtime,Storage,Teams,Users,Webhooks]
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: checkout
|
||||||
|
# uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# fetch-depth: 2
|
||||||
|
# submodules: recursive
|
||||||
|
|
||||||
|
# - name: Start Appwrite
|
||||||
|
# run: |
|
||||||
|
# docker compose up -d
|
||||||
|
# sleep 30
|
||||||
|
|
||||||
|
# - name: Run ${{matrix.services}} Tests
|
||||||
|
# run: docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.services}} --debug
|
||||||
Loading…
Reference in a new issue