Skip to content

Commit

Permalink
despliegue tests
Browse files Browse the repository at this point in the history
  • Loading branch information
UO271033 authored May 4, 2022
1 parent 9b7d629 commit 96c574e
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions .github/workflows/asw2122.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,48 @@ on:
types: [published]

jobs:
# unit-test-webapp:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: webapp
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: 16
# - run: npm ci
# - run: npm test
# - uses: codecov/codecov-action@v2
# unit-test-restapi:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: restapi
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: 16
# - run: npm ci
# - run: npm test
# - uses: codecov/codecov-action@v2
# e2e-tests:
# needs: [unit-test-webapp, unit-test-restapi]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: 16
# - run: npm --prefix webapp install
# - run: npm --prefix restapi install
# - run: npm --prefix webapp run build
# - run: npm --prefix webapp run test:e2e
unit-test-webapp:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webapp
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- run: npm test
- uses: codecov/codecov-action@v2
unit-test-restapi:
runs-on: ubuntu-latest
defaults:
run:
working-directory: restapi
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- run: npm test
- uses: codecov/codecov-action@v2
e2e-tests:
needs: [unit-test-webapp, unit-test-restapi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm --prefix webapp install
- run: npm --prefix restapi install
- run: npm --prefix webapp run build
- run: npm --prefix webapp run test:e2e
docker-push-webapp:
name: Push webapp Docker Image to GitHub Packages
runs-on: ubuntu-latest
# needs: [e2e-tests]
needs: [e2e-tests]
steps:
- uses: actions/checkout@v2
- name: Publish to Registry
Expand All @@ -60,7 +60,7 @@ jobs:
docker-push-restapi:
name: Push restapi Docker Image to GitHub Packages
runs-on: ubuntu-latest
# needs: [e2e-tests]
needs: [e2e-tests]
steps:
- uses: actions/checkout@v2
- name: Publish to Registry
Expand All @@ -72,7 +72,7 @@ jobs:
registry: ghcr.io
workdir: restapi
deploy-webapp:
# needs: [e2e-tests]
needs: [e2e-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -88,7 +88,7 @@ jobs:
env:
API_URI: "https://dede5crestapi.herokuapp.com/api"
deploy-restapi:
# needs: [e2e-tests]
needs: [e2e-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -103,4 +103,4 @@ jobs:
docker_build_args: |
MONGO_URI
env:
MONGO_URI: "mongodb+srv://dede_5c:cuentademongo@dede.irypt.mongodb.net/DeDe_ASW?retryWrites=true&w=majority"
MONGO_URI: "mongodb+srv://dede_5c:cuentademongo@dede.irypt.mongodb.net/DeDe_ASW?retryWrites=true&w=majority"

0 comments on commit 96c574e

Please sign in to comment.