chore: update CI file
This commit is contained in:
parent
733b7ed612
commit
10f6cc7b0b
124
.github/workflows/tests.yml
vendored
124
.github/workflows/tests.yml
vendored
|
@ -42,17 +42,21 @@ jobs:
|
|||
load: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
outputs: type=docker,dest=/tmp/${{ env.IMAGE }}.tar
|
||||
# outputs: type=docker,dest=/tmp/${{ env.IMAGE }}.tar
|
||||
build-args: |
|
||||
DEBUG=false
|
||||
TESTING=true
|
||||
VERSION=dev
|
||||
|
||||
- name: Cache Docker Image
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ env.IMAGE }}-${{ github.sha }}
|
||||
path: /tmp/${{ env.IMAGE }}.tar
|
||||
- name: Save Docker Images
|
||||
run: |
|
||||
docker images --filter="dangling=false" | sed '1d' | awk '{print $1 ":" $2 }'
|
||||
|
||||
# - name: Cache Docker Image
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# key: ${{ env.IMAGE }}-${{ github.sha }}
|
||||
# path: /tmp/${{ env.IMAGE }}.tar
|
||||
|
||||
# - name: Upload Docker Image
|
||||
# uses: actions/upload-artifact@v3
|
||||
|
@ -60,68 +64,68 @@ jobs:
|
|||
# name: ${{ env.IMAGE }}
|
||||
# path: /tmp/${{ env.IMAGE }}.tar
|
||||
|
||||
unit_test:
|
||||
name: Unit Test
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
# unit_test:
|
||||
# name: Unit Test
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: setup
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
submodules: recursive
|
||||
# steps:
|
||||
# - name: checkout
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# fetch-depth: 1
|
||||
# submodules: recursive
|
||||
|
||||
- name: Load Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ env.IMAGE }}-${{ github.sha }}
|
||||
path: /tmp/${{ env.IMAGE }}.tar
|
||||
fail-on-cache-miss: true
|
||||
# - name: Load Cache
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# key: ${{ env.IMAGE }}-${{ github.sha }}
|
||||
# path: /tmp/${{ env.IMAGE }}.tar
|
||||
# fail-on-cache-miss: true
|
||||
|
||||
- name: Load and Start Appwrite
|
||||
run: |
|
||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||
docker compose up -d
|
||||
sleep 10
|
||||
# - name: Load and Start Appwrite
|
||||
# run: |
|
||||
# docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||
# docker compose up -d
|
||||
# sleep 10
|
||||
|
||||
- name: Doctor
|
||||
run: docker compose exec -T appwrite doctor
|
||||
# - name: Doctor
|
||||
# run: docker compose exec -T appwrite doctor
|
||||
|
||||
- name: Environment Variables
|
||||
run: docker compose exec -T appwrite vars
|
||||
# - name: Environment Variables
|
||||
# run: docker compose exec -T appwrite vars
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: docker compose exec appwrite test /usr/src/code/tests/unit
|
||||
# - name: Run Unit Tests
|
||||
# run: docker compose exec appwrite test /usr/src/code/tests/unit
|
||||
|
||||
e2e_test:
|
||||
name: E2E Test
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
services: [Account,Avatars,Console,Databases,Functions,GraphQL,Health,Locale,Projects,Realtime,Storage,Teams,Users,Webhooks]
|
||||
# e2e_test:
|
||||
# name: E2E Test
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: setup
|
||||
# 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
|
||||
# steps:
|
||||
# - name: checkout
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# fetch-depth: 2
|
||||
# submodules: recursive
|
||||
|
||||
- name: Load Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ env.IMAGE }}-${{ github.sha }}
|
||||
path: /tmp/${{ env.IMAGE }}.tar
|
||||
fail-on-cache-miss: true
|
||||
# - name: Load Cache
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# key: ${{ env.IMAGE }}-${{ github.sha }}
|
||||
# path: /tmp/${{ env.IMAGE }}.tar
|
||||
# fail-on-cache-miss: true
|
||||
|
||||
- name: Load and Start Appwrite
|
||||
run: |
|
||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||
docker compose up -d
|
||||
sleep 20
|
||||
# - name: Load and Start Appwrite
|
||||
# run: |
|
||||
# docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||
# docker compose up -d
|
||||
# sleep 20
|
||||
|
||||
- name: Run ${{matrix.services}} Tests
|
||||
run: docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.services}} --debug
|
||||
# - 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