include unit tests in github ci

This commit is contained in:
Ulf Gebhardt 2021-01-20 14:14:17 +01:00
parent ac3f330fd0
commit f7cb81f52a
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -15,13 +15,20 @@ jobs:
scripts/translations/sort.sh scripts/translations/sort.sh
scripts/translations/missing-keys.sh scripts/translations/missing-keys.sh
- name: Build neo4j image ##########################################################################
# NEO4J ##################################################################
##########################################################################
- name: [Neo4J] Build `community` image
uses: docker/build-push-action@v1.1.0 uses: docker/build-push-action@v1.1.0
with: with:
repository: ocelotsocialnetwork/neo4j repository: ocelotsocialnetwork/neo4j
tags: latest tags: latest
path: neo4j/ path: neo4j/
push: false push: false
##########################################################################
# BACKEND ################################################################
##########################################################################
# TODO: We want to push this to dockerhub # TODO: We want to push this to dockerhub
#- name: Build backend production image #- name: Build backend production image
# uses: docker/build-push-action@v1.1.0 # uses: docker/build-push-action@v1.1.0
@ -31,7 +38,9 @@ jobs:
# target: production # target: production
# path: backend/ # path: backend/
# push: false # push: false
- name: Build backend build image
# Build Docker Image (build)
- name: [backend] Build `build` image
uses: docker/build-push-action@v1.1.0 uses: docker/build-push-action@v1.1.0
with: with:
repository: ocelotsocialnetwork/backend repository: ocelotsocialnetwork/backend
@ -39,6 +48,18 @@ jobs:
target: build target: build
path: backend/ path: backend/
push: false push: false
# Lint
- name: [backend] Lint
run: docker run --rm ocelotsocialnetwork/backend:build yarn run lint
# Unit Tests
- name: [backend] unit tests
run: docker run --rm ocelotsocialnetwork/backend:build yarn run test:jest
##########################################################################
# WEBAPP #################################################################
##########################################################################
# TODO: We want to push this to dockerhub # TODO: We want to push this to dockerhub
#- name: Build webapp production image #- name: Build webapp production image
# uses: docker/build-push-action@v1.1.0 # uses: docker/build-push-action@v1.1.0
@ -48,7 +69,9 @@ jobs:
# target: production # target: production
# path: webapp/ # path: webapp/
# push: false # push: false
- name: Build webapp build image
# Build Docker Image (build)
- name: [webapp] Build `build` image
uses: docker/build-push-action@v1.1.0 uses: docker/build-push-action@v1.1.0
with: with:
repository: ocelotsocialnetwork/webapp repository: ocelotsocialnetwork/webapp
@ -57,8 +80,11 @@ jobs:
path: webapp/ path: webapp/
push: false push: false
- name: Lint backend # Lint
run: docker run --rm ocelotsocialnetwork/backend:build yarn run lint - name: [webapp] Lint
- name: Lint webapp
run: docker run --rm ocelotsocialnetwork/webapp:build yarn run lint run: docker run --rm ocelotsocialnetwork/webapp:build yarn run lint
# Unit Tests
- name: [webapp] unit tests
run: docker run --rm ocelotsocialnetwork/webapp:build yarn run test