chore: update CI file
This commit is contained in:
parent
ebb4bc7e6b
commit
1415727f10
36
.github/workflows/tests.yml
vendored
36
.github/workflows/tests.yml
vendored
|
@ -42,11 +42,24 @@ jobs:
|
||||||
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/${{ env.IMAGE }}.tar
|
||||||
build-args: |
|
build-args: |
|
||||||
DEBUG=false
|
DEBUG=false
|
||||||
TESTING=true
|
TESTING=true
|
||||||
VERSION=dev
|
VERSION=dev
|
||||||
|
|
||||||
|
- 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
|
||||||
|
# with:
|
||||||
|
# name: ${{ env.IMAGE }}
|
||||||
|
# path: /tmp/${{ env.IMAGE }}.tar
|
||||||
|
|
||||||
unit_test:
|
unit_test:
|
||||||
name: Unit Test
|
name: Unit Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -59,9 +72,19 @@ jobs:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Start Appwrite
|
- 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
|
||||||
|
if: steps.load-cache.outputs.cache-hit == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
sleep 10
|
||||||
|
|
||||||
- name: Doctor
|
- name: Doctor
|
||||||
run: docker compose exec -T appwrite doctor
|
run: docker compose exec -T appwrite doctor
|
||||||
|
@ -88,8 +111,17 @@ jobs:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Start Appwrite
|
- 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
|
||||||
|
if: steps.load-cache.outputs.cache-hit == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
sleep 20
|
sleep 20
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue