mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
- refactored dependencies
- removed forced step between building and testing
This commit is contained in:
parent
6638e2d414
commit
6805863ac9
96
.github/workflows/ci.yml
vendored
96
.github/workflows/ci.yml
vendored
@ -102,17 +102,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: docker-webapp-image
|
name: docker-webapp-image
|
||||||
path: /tmp/webapp.tar
|
path: /tmp/webapp.tar
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# JOB: AFTER DOCKER BUILD ####################################################
|
|
||||||
##############################################################################
|
|
||||||
after_docker_build:
|
|
||||||
name: After Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [build_test_neo4j, build_test_backend, build_test_webapp]
|
|
||||||
steps:
|
|
||||||
- name: Do nothing
|
|
||||||
run: echo "I do nothing"
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# JOB: LINT BACKEND ##########################################################
|
# JOB: LINT BACKEND ##########################################################
|
||||||
@ -120,7 +109,7 @@ jobs:
|
|||||||
lint_backend:
|
lint_backend:
|
||||||
name: Lint backend
|
name: Lint backend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: after_docker_build
|
needs: [build_test_backend]
|
||||||
steps:
|
steps:
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# CHECKOUT CODE ##########################################################
|
# CHECKOUT CODE ##########################################################
|
||||||
@ -130,7 +119,7 @@ jobs:
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
- name: Download Docker Image (Artifact)
|
- name: Download Docker Image (Backend)
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: docker-backend-image
|
name: docker-backend-image
|
||||||
@ -147,9 +136,9 @@ jobs:
|
|||||||
# JOB: LINT WEBAPP ###########################################################
|
# JOB: LINT WEBAPP ###########################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
lint_webapp:
|
lint_webapp:
|
||||||
name: Lint backend
|
name: Lint webapp
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: after_docker_build
|
needs: [build_test_webapp]
|
||||||
steps:
|
steps:
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# CHECKOUT CODE ##########################################################
|
# CHECKOUT CODE ##########################################################
|
||||||
@ -159,7 +148,7 @@ jobs:
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
- name: Download Docker Image (Artifact)
|
- name: Download Docker Image (Webapp)
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: docker-webapp-image
|
name: docker-webapp-image
|
||||||
@ -173,34 +162,75 @@ jobs:
|
|||||||
run: docker run --rm ocelotsocialnetwork/webapp:build yarn run lint
|
run: docker run --rm ocelotsocialnetwork/webapp:build yarn run lint
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# JOB: UNIT TESTS ############################################################
|
# JOB: UNIT TEST BACKEND #####################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#unit_tests:
|
unit_test_backend:
|
||||||
# name: Unit Tests
|
name: Unit tests - backend
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# needs: prepare
|
needs: [build_test_neo4j,build_test_backend]
|
||||||
# steps:
|
steps:
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# CHECKOUT CODE ##########################################################
|
# CHECKOUT CODE ##########################################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
#- name: Checkout code
|
- name: Checkout code
|
||||||
# uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
##########################################################################
|
||||||
|
# DOWNLOAD DOCKER IMAGES #################################################
|
||||||
|
##########################################################################
|
||||||
|
- name: Download Docker Image (Neo4J)
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: docker-neo4j-image
|
||||||
|
path: /tmp/neo4j.tar
|
||||||
|
- name: Load Docker Image
|
||||||
|
run: docker load < /tmp/neo4j.tar
|
||||||
|
- name: Download Docker Image (Backend)
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: docker-backend-image
|
||||||
|
path: /tmp/backend.tar
|
||||||
|
- name: Load Docker Image
|
||||||
|
run: docker load < /tmp/backend.tar
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# UNIT TESTS BACKEND #####################################################
|
# UNIT TESTS BACKEND #####################################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
#- name: backend | copy env files (webapp, backend)
|
- name: backend | copy env files (webapp, backend)
|
||||||
# run: cp webapp/.env.template webapp/.env
|
run: cp webapp/.env.template webapp/.env
|
||||||
# run: cp backend/.env.template backend/.env
|
run: cp backend/.env.template backend/.env
|
||||||
#- name: backend | docker-compose
|
- name: backend | docker-compose
|
||||||
# run: docker-compose up
|
run: docker-compose up
|
||||||
#- name: backend | Unit tests
|
- name: backend | Unit tests
|
||||||
# run: docker-compose exec backend yarn test
|
run: docker-compose exec backend yarn test
|
||||||
#run: docker run --network container:webapp-frontend appropriate/curl -s --retry 10 --retry-connrefused http://localhost:5000/
|
#run: docker run --network container:webapp-frontend appropriate/curl -s --retry 10 --retry-connrefused http://localhost:5000/
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# JOB: UNIT TEST WEBAPP ######################################################
|
||||||
|
##############################################################################
|
||||||
|
unit_test_webapp:
|
||||||
|
name: Unit tests - webapp
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build_test_webapp]
|
||||||
|
steps:
|
||||||
|
##########################################################################
|
||||||
|
# CHECKOUT CODE ##########################################################
|
||||||
|
##########################################################################
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
##########################################################################
|
||||||
|
# DOWNLOAD DOCKER IMAGES #################################################
|
||||||
|
##########################################################################
|
||||||
|
- name: Download Docker Image (Webapp)
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: docker-webapp-image
|
||||||
|
path: /tmp/webapp.tar
|
||||||
|
- name: Load Docker Image
|
||||||
|
run: docker load < /tmp/webapp.tar
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# UNIT TESTS WEBAPP #####################################################
|
# UNIT TESTS WEBAPP #####################################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
#- name: webapp | Unit tests
|
- name: webapp | Unit tests
|
||||||
# run: docker run --rm ocelotsocialnetwork/webapp:build yarn run test
|
run: docker run --rm ocelotsocialnetwork/webapp:build yarn run test
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# JOB: DOCKER BUILD PRODUCTION & PUSH ########################################
|
# JOB: DOCKER BUILD PRODUCTION & PUSH ########################################
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user